Index: openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 25 Aug 2001 14:22:32 -0000 1.3 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 28 Aug 2001 23:31:30 -0000 1.4 @@ -9,6 +9,7 @@ -- This is free software distributed under the terms of the GNU Public -- License. Full text of the license is available from the GNU Project: -- http://www.fsf.org/copyleft/gpl.html +set serveroutput on size 1000000 format wrapped create or replace package body content_item as Index: openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql 25 Aug 2001 14:22:32 -0000 1.2 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-test.sql 28 Aug 2001 23:31:30 -0000 1.3 @@ -178,28 +178,28 @@ dbms_output.put_line('Path for puppy ' || item_id || ' from folder_id: ' || folder_id || ' is ' || content_item.get_path(item_id,folder_id)); ---dbms_output.put_line('Path for puppy ' || item_id || --- ' from sub_folder_id: ' || sub_folder_id || ' is ' || --- content_item.get_path(item_id,sub_folder_id)); ---dbms_output.put_line('Path for puppy' || item_id --- || ' from sub_sub_folder_id: ' || sub_sub_folder_id || ' is ' || --- content_item.get_path(item_id,sub_sub_folder_id)); ---dbms_output.put_line('Get id of item with invalid path - shouldn''t return anything'); ---dbms_output.put_line('Found item at ' || content_item.get_id('grandpa/me', -200)); ---dbms_output.put_line('Get id of item using subpath'); ---dbms_output.put_line('Found item at ' || content_item.get_id('pa/me/puppy', folder_id)); ---dbms_output.put_line('This is the path to a folder from a subfolder'); ---dbms_output.put_line('Path for ' || sub_folder_id || ' from sub_sub_folder_id: ' || --- sub_sub_folder_id || ' is ' || --- content_item.get_path(sub_folder_id,sub_sub_folder_id)); ---dbms_output.put_line('This is a path to an item from a non-existant item'); ---dbms_output.put_line('Path for ' || item_id || ' from nonexistant_id: ' || --- -200 || ' is ' || --- content_item.get_path(item_id,-200)); ---dbms_output.put_line('This is a path to an item from a non-related branch'); ---dbms_output.put_line('Path for ' || item_id || ' from unrelated branch: ' || --- folder_b_id || ' is ' || --- content_item.get_path(item_id,folder_b_id)); +dbms_output.put_line('Path for puppy ' || item_id || + ' from sub_folder_id: ' || sub_folder_id || ' is ' || + content_item.get_path(item_id,sub_folder_id)); +dbms_output.put_line('Path for puppy' || item_id + || ' from sub_sub_folder_id: ' || sub_sub_folder_id || ' is ' || + content_item.get_path(item_id,sub_sub_folder_id)); +dbms_output.put_line('Get id of item with invalid path - shouldn''t return anything'); +dbms_output.put_line('Found item at ' || content_item.get_id('grandpa/me', -200)); +dbms_output.put_line('Get id of item using subpath'); +dbms_output.put_line('Found item at ' || content_item.get_id('pa/me/puppy', folder_id)); +dbms_output.put_line('This is the path to a folder from a subfolder'); +dbms_output.put_line('Path for ' || sub_folder_id || ' from sub_sub_folder_id: ' || + sub_sub_folder_id || ' is ' || + content_item.get_path(sub_folder_id,sub_sub_folder_id)); +dbms_output.put_line('This is a path to an item from a non-existant item'); +dbms_output.put_line('Path for ' || item_id || ' from nonexistant_id: ' || + -200 || ' is ' || + content_item.get_path(item_id,-200)); +dbms_output.put_line('This is a path to an item from a non-related branch'); +dbms_output.put_line('Path for ' || item_id || ' from unrelated branch: ' || + folder_b_id || ' is ' || + content_item.get_path(item_id,folder_b_id)); dbms_output.put_line('-------------------------------------'); @@ -228,7 +228,7 @@ dbms_output.put_line('-------------------------------------'); dbms_output.put_line('SYMLINKS...'); --dbms_output.put_line('...all tests passed'); - +/* symlink_a_id := content_symlink.new('link_a',sub_sub_folder_id,sub_folder_id); dbms_output.put_line('Create a link in pa to aunty: Symlink is ' || symlink_a_id); @@ -277,7 +277,7 @@ dbms_output.put_line('--------------------------------'); - +*/ --dbms_output.put_line('Moving item ' || item_id || ' to grandma ' || -- folder_b_id); --content_item.move(item_id,folder_b_id); @@ -294,6 +294,7 @@ --dbms_output.put_line('--------------------------------'); -- symlinks/revisions should be deleted automatically +/* content_item.delete(simple_item_id); content_template.delete(item_template_id); content_item.delete(item_id); @@ -304,7 +305,7 @@ content_folder.delete(sub_folder_id); content_folder.delete(folder_id); content_folder.delete(folder_b_id); - +*/ end; / show errors Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql 4 Apr 2001 23:56:49 -0000 1.7 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-test.sql 28 Aug 2001 23:31:30 -0000 1.8 @@ -680,14 +680,13 @@ \t select content_test__create(); +select content_test__dump(); select content_test__check1(); select content_test__check2(); -select content_test__dump(); select content_test__check3(); select content_test__check4(); select content_test__check5(); -select content_test__dump(); \t drop function content_test__create(); drop function content_test__check1(); Index: openacs-4/packages/cms/sql/postgresql/cms-workflow.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-workflow.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/cms/sql/postgresql/cms-workflow.sql 24 Aug 2001 14:44:58 -0000 1.9 +++ openacs-4/packages/cms/sql/postgresql/cms-workflow.sql 28 Aug 2001 23:31:30 -0000 1.10 @@ -417,7 +417,7 @@ -create function get_first_place() returns varchar as ' +create function content_workflow__get_first_place() returns varchar as ' declare v_first_place wf_places.place_key%TYPE; begin Index: openacs-4/packages/cms/tcl/content-method-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/content-method-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/tcl/content-method-procs.tcl 20 Aug 2001 04:35:41 -0000 1.4 +++ openacs-4/packages/cms/tcl/content-method-procs.tcl 28 Aug 2001 23:31:30 -0000 1.5 @@ -177,7 +177,7 @@ if { $has_text_mime_type == 0 } { set text_entry_filter_sql \ - "and m.content_method ^= 'text_entry'" + "and m.content_method <> 'text_entry'" } return $text_entry_filter_sql Index: openacs-4/packages/cms/tcl/publish-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/publish-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/tcl/publish-procs-postgresql.xql 11 Aug 2001 17:41:34 -0000 1.1 +++ openacs-4/packages/cms/tcl/publish-procs-postgresql.xql 28 Aug 2001 23:31:30 -0000 1.2 @@ -6,7 +6,11 @@ - select content from cr_revisions where revision_id = $revision_id + select case when i.storage_type = 'file' + then '[cr_fs_path]' || r.content + else r.content end as content, i.storage_type + from cr_revisions r, cr_items i + where r.item_id = i.item_id and r.revision_id = $revision_id Index: openacs-4/packages/cms/www/modules/items/content-download-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/content-download-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/items/content-download-postgresql.xql 25 Jul 2001 03:53:11 -0000 1.2 +++ openacs-4/packages/cms/www/modules/items/content-download-postgresql.xql 28 Aug 2001 23:31:30 -0000 1.3 @@ -7,7 +7,9 @@ select - '[cr_fs_path]' || r.content as content, i.storage_type + case when i.storage_type = 'file' + then '[cr_fs_path]' || r.content + else r.content end as content, i.storage_type from cr_revisions r, cr_items i where Index: openacs-4/packages/cms/www/modules/items/template-register-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/template-register-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/template-register-oracle.xql 28 Aug 2001 23:31:30 -0000 1.1 @@ -0,0 +1,19 @@ + + + + oracle8.1.6 + + + + + begin content_item.register_template( + item_id => :item_id, + template_id => :template_id, + use_context => :context ); + end; + + + + + + Index: openacs-4/packages/cms/www/modules/items/template-register-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/template-register-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/www/modules/items/template-register-postgresql.xql 28 Aug 2001 23:31:30 -0000 1.1 @@ -0,0 +1,19 @@ + + + + postgresql7.1 + + + + + select content_item__register_template( + :item_id, + :template_id, + :context ); + + + + + + + Index: openacs-4/packages/cms/www/modules/items/template-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/template-register.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/items/template-register.tcl 24 May 2001 23:57:17 -0000 1.2 +++ openacs-4/packages/cms/www/modules/items/template-register.tcl 28 Aug 2001 23:31:30 -0000 1.3 @@ -16,7 +16,7 @@ and item_id = :item_id" if { $second_template_p == 0 } { - if { [catch { template::query template_register dml "begin content_item.register_template( + if { [catch { db_exec_plsql register_template_to_item "begin content_item.register_template( item_id => :item_id, template_id => :template_id, use_context => :context );