Index: openacs-4/packages/acs-content-repository/tcl/content-revision-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-revision-procs-oracle.xql,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs-oracle.xql 10 Feb 2005 19:06:49 -0000 1.1.2.2 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs-oracle.xql 23 Feb 2005 10:24:54 -0000 1.1.2.3 @@ -22,4 +22,13 @@ + + + update $lob_table + set $lob_attribute = empty_clob() + where $lob_id_column = :revision_id + returning $lob_attribute into :1 + + + \ No newline at end of file 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.4.2.7 -r1.4.2.8 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 9 Feb 2005 16:14:52 -0000 1.4.2.7 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 23 Feb 2005 10:24:54 -0000 1.4.2.8 @@ -87,25 +87,32 @@ if { [exists_and_not_null attributes] } { set type_attributes [package_object_attribute_list $content_type] set valid_attributes [list] + set lob_values [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 {![string equal "cr_revisions" [lindex $type_attribute 1]]} { - lappend valid_attributes [lindex $type_attribute 2] + if {[db_type] == "oracle" && [string equal "text" [lindex $type_attribute 4]]} { + set lob_attributes([lindex $type_attribute 2]) [list [lindex $type_attribute 7] [lindex $type_attribute 8]] + } else { + 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} { - + if {[lsearch $valid_attributes $attribute_name] > -1} { # first add the column name to the list append attribute_names ", ${attribute_name}" # create local variable to use for binding set $attribute_name $attribute_value append attribute_values ", :${attribute_name}" } + if {[info exists lob_attributes($attribute_name)]} { + lappend lob_values $attribute_name $attribute_value [lindex $lob_attributes($attribute_name) 0] [lindex $lob_attributes($attribute_name) 1] + } } } @@ -123,6 +130,9 @@ update_content \ -revision_id $revision_id \ -content $content + foreach {lob_attribute lob_value lob_table lob_id_column} $lob_values { + db_dml update_lob_attribute {} -clobs [list $lob_value] + } } ns_log notice " DB --------------------------------------------------------------------------------