Forum OpenACS Development: Re: title attribute in both acs_objects and cr_revisions

Collapse
Posted by Stan Kaufman on
Dave, since it's acs_objects.title we want and cr_revisions.title that we don't, why not simply special case *skip* the latter:

Index: cms/tcl/form-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/cms/tcl/form-procs.tcl,v
retrieving revision 1.27
diff -u -r1.27 form-procs.tcl
--- cms/tcl/form-procs.tcl      17 May 2005 21:25:08 -0000      1.27
+++ cms/tcl/form-procs.tcl      6 Oct 2005 17:41:23 -0000
@@ -807,7 +807,7 @@
                 }
             }
             
-            if { ! [string equal $value {} ] } {
+            if { ! [string equal $value {} ] && ![expr { [string equal $ancestor "content_revision"] && [string equal $attribute_name "title"] }] } {
                 ns_set put $bind_vars $attribute_name $value
 
                 lappend columns $attribute_name

Doesn't that accomplish the same thing without manually adding in all the acs_objects attributes?