Index: openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 12 Jul 2009 01:08:23 -0000 1.25 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 27 Oct 2014 16:39:11 -0000 1.26 @@ -92,10 +92,10 @@ set creation_ip [ad_conn peeraddr] } - if {![exists_and_not_null content_type]} { + if {![info exists content_type] || $content_type eq ""} { set content_type [::content::item::content_type -item_id $item_id] } - if {![exists_and_not_null storage_type]} { + if {$storage_type eq ""} { set storage_type [db_string get_storage_type ""] } if {![info exists package_id]} { @@ -104,22 +104,23 @@ set attribute_names "" set attribute_values "" - if { [exists_and_not_null attributes] } { + if { [info exists attributes] && $attributes ne "" } { set type_attributes [package_object_attribute_list $content_type] set valid_attributes [list] # add in extended attributes for this type, ingore # content_revision as those are already captured as named # parameters to this procedure foreach type_attribute $type_attributes { - if {"cr_revisions" ne [lindex $type_attribute 1] \ - && "acs_objects" ne [lindex $type_attribute 1] } { + if {"cr_revisions" ne [lindex $type_attribute 1] + && "acs_objects" ne [lindex $type_attribute 1] + } { lappend valid_attributes [lindex $type_attribute 2] } } foreach attribute_pair $attributes { - foreach {attribute_name attribute_value} $attribute_pair {break} - if {[lsearch $valid_attributes $attribute_name] > -1} { + lassign $attribute_pair attribute_name attribute_value + if {$attribute_name in $valid_attributes} { # first add the column name to the list append attribute_names ", ${attribute_name}"