Index: openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql 29 Aug 2007 18:28:15 -0000 1.13 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-image.sql 20 Jan 2008 16:19:51 -0000 1.14 @@ -329,7 +329,7 @@ v_content cr_files_to_delete.path%TYPE default null; begin -- You need to delete the image from the table - delete from images where image_id = image.delete_revision.revision_id + delete from images where image_id = image.delete_revision.revision_id; content_revision.del ( revision_id => revision_id ); Index: openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql,v diff -u -r1.27 -r1.28 --- openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 17 Sep 2007 12:58:30 -0000 1.27 +++ openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 20 Jan 2008 16:19:51 -0000 1.28 @@ -915,6 +915,47 @@ revision_id in cr_revisions.revision_id%TYPE ) return varchar2; +procedure index_attributes( + --/** Generates an XML document for insertion into cr_revision_attributes, + -- which is indexed by Intermedia for searching attributes. + -- @author Karl Goldstein + -- @param revision_id The id of the revision to index + -- @see {content_revision.new} + --*/ + revision_id IN cr_revisions.revision_id%TYPE +); + +function export_xml ( + revision_id IN cr_revisions.revision_id%TYPE +) return cr_xml_docs.doc_id%TYPE; + +function write_xml ( + revision_id IN number, + clob_loc IN clob +) return number as language + java +name + 'com.arsdigita.content.XMLExchange.exportRevision( + java.lang.Integer, oracle.sql.CLOB + ) return int'; + +function import_xml ( + item_id IN cr_items.item_id%TYPE, + revision_id IN cr_revisions.revision_id%TYPE, + doc_id IN number +) return cr_revisions.revision_id%TYPE; + +function read_xml ( + item_id IN number, + revision_id IN number, + clob_loc IN clob +) return number as language + java +name + 'com.arsdigita.content.XMLExchange.importRevision( + java.lang.Integer, java.lang.Integer, oracle.sql.CLOB + ) return int'; + procedure to_html ( --/** Converts a revision uploaded as a binary document to html -- @author Karl Goldstein @@ -923,6 +964,15 @@ revision_id IN cr_revisions.revision_id%TYPE ); +procedure replace( + revision_id number, search varchar2, replace varchar2) +as language + java +name + 'com.arsdigita.content.Regexp.replace( + int, java.lang.String, java.lang.String + )'; + function is_live ( -- /** Determine if the revision is live -- @author Karl Goldstein, Stanislav Freidin Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.4.0d3-5.4.0d4.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/oracle/upgrade/upgrade-5.4.0d4-5.4.0d5.sql'. Fisheye: No comparison available. Pass `N' to diff? 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.22 -r1.23 --- openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 25 Sep 2007 15:22:34 -0000 1.22 +++ openacs-4/packages/acs-content-repository/tcl/content-revision-procs.tcl 20 Jan 2008 16:19:52 -0000 1.23 @@ -271,6 +271,19 @@ } +ad_proc -public content::revision::export_xml { + -revision_id:required +} { + @param revision_id + + @return NUMBER(38) +} { + return [package_exec_plsql -var_list [list \ + [list revision_id $revision_id ] \ + ] content_revision export_xml] +} + + ad_proc -public content::revision::get_number { -revision_id:required } { @@ -284,6 +297,25 @@ } +ad_proc -public content::revision::import_xml { + -item_id:required + -revision_id:required + -doc_id:required +} { + @param item_id + @param revision_id + @param doc_id + + @return NUMBER(38) +} { + return [package_exec_plsql -var_list [list \ + [list item_id $item_id ] \ + [list revision_id $revision_id ] \ + [list doc_id $doc_id ] \ + ] content_revision import_xml] +} + + ad_proc -public content::revision::index_attributes { -revision_id:required } { @@ -334,7 +366,25 @@ } +ad_proc -public content::revision::read_xml { + -item_id:required + -revision_id:required + -clob_loc:required +} { + @param item_id + @param revision_id + @param clob_loc + @return NUMBER +} { + return [package_exec_plsql -var_list [list \ + [list item_id $item_id ] \ + [list revision_id $revision_id ] \ + [list clob_loc $clob_loc ] \ + ] content_revision read_xml] +} + + ad_proc -public content::revision::replace { -revision_id:required -search:required @@ -387,6 +437,29 @@ } +ad_proc -public content::revision::write_xml { + -revision_id:required + -clob_loc:required +} { + @param revision_id + @param clob_loc + + @return NUMBER +} { + return [package_exec_plsql -var_list [list \ + [list revision_id $revision_id ] \ + [list clob_loc $clob_loc ] \ + ] content_revision write_xml] +} + + +ad_proc -public content::revision::update_attribute_index { +} { +} { + return [package_exec_plsql content_revision update_attribute_index] +} + + ad_proc -public content::revision::get_cr_file_path { -revision_id } {