Index: openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql 31 Oct 2001 20:42:07 -0000 1.2 +++ openacs-4/packages/acs-content-repository/tcl/revision-procs-oracle.xql 15 Nov 2001 01:47:13 -0000 1.3 @@ -53,4 +53,134 @@ + + + + begin + content_type.register_mime_type('content_revision', :mime_type); + end; + + + + + + select content_item.is_subclass(:image_type, 'image') from dual + + + + + + select content_item.is_subclass(:other_type, 'content_revision') from dual + + + + + + begin + :1 := image.new( + name => :object_name, + parent_id => :parent_id, + item_id => :item_id, + revision_id => :revision_id, + creation_user => :creation_user, + creation_ip => :creation_ip, + content_type => :image_type, + storage_type => :storage_type, + height => :original_height, + width => :original_width + ); + end; + + + + + + begin + :1 := image.new_revision ( + item_id => :item_id, + revision_id => :revision_id, + title => :title, + description => :description, + mime_type => :mime_type, + creation_user => :creation_user, + creation_ip => :creation_ip, + height => :original_height, + width => :original_width + ); + end; + + + + + + begin + :1 := content_item.new( + name => :object_name, + item_id => :item_id, + parent_id => :parent_id, + context_id => :parent_id, + creation_user => :creation_user, + creation_ip => :creation_ip, + content_type => :other_type, + storage_type => :storage_type + ); + end; + + + + + + begin + :1 := image.new_revision ( + item_id => :item_id, + revision_id => :revision_id, + title => :title, + description => :description, + mime_type => :mime_type, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + + + + + + + update cr_revisions + set filename = :filename, + content_length = :tmp_size + where revision_id = :revision_id + + + + + + + update cr_revisions + set mime_type = :mime_type, + content = empty_blob() + where revision_id = :revision_id + returning content into :1 + + + + + + + + update cr_revisions + set content_length = dbms_lob.getlength(content) + where revision_id = :revision_id + + + + + + + begin content_item.set_live_revision (revision_id => :revision_id); + end; + + +