Index: openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl,v diff -u -r1.12.2.3 -r1.12.2.4 --- openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 1 Apr 2004 01:50:14 -0000 1.12.2.3 +++ openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 19 Apr 2004 00:59:23 -0000 1.12.2.4 @@ -84,6 +84,8 @@ # actual content if {![string equal -nocase "head" [ns_conn method]]} { db_write_blob write_lob_content "" + } else { + ns_conn close } } } @@ -164,6 +166,14 @@ set item_id [db_nextval acs_object_id_seq] } + + # use content_type of existing item + if $old_item_p { + set content_type [db_string get_content_type ""] + } else { + set content_type [cr_registered_type_for_mime_type $mime_type] + } + set revision_id [db_nextval acs_object_id_seq] db_transaction { @@ -173,7 +183,7 @@ db_exec_plsql mime_type_register "" } - switch [cr_registered_type_for_mime_type $mime_type] { + switch $content_type { image { if { [db_string image_subclass ""] == "f" } {