Index: openacs-4/packages/acs-content-repository/acs-content-repository.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v diff -u -r1.41 -r1.42 --- openacs-4/packages/acs-content-repository/acs-content-repository.info 29 Jun 2004 10:17:35 -0000 1.41 +++ openacs-4/packages/acs-content-repository/acs-content-repository.info 1 Jul 2004 16:33:38 -0000 1.42 @@ -7,7 +7,7 @@ t t - + OpenACS The canonical repository for OpenACS content. 2004-04-29 @@ -19,7 +19,7 @@ other CMS backing functionality. Utilized by Bug Tracker, File Storage, and other packages. - + Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 12 Mar 2004 18:48:47 -0000 1.16 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 1 Jul 2004 16:33:38 -0000 1.17 @@ -10,7 +10,7 @@ -- License. Full text of the license is available from the GNU Project: -- http://www.fsf.org/copyleft/gpl.html -select define_function_args('content_extlink__new','name,url,label,description,parent_id,extlink_id,creation_date;now,creation_user,creation_ip'); +select define_function_args('content_extlink__new','name,url,label,description,parent_id,extlink_id,creation_date;now,creation_user,creation_ip,package_id'); create or replace function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamptz,integer,varchar,integer) returns integer as ' @@ -110,6 +110,8 @@ end;' language 'plpgsql'; +select define_function_args('content_extlink__delete','extlink_id'); + create or replace function content_extlink__delete (integer) returns integer as ' declare @@ -124,7 +126,7 @@ return 0; end;' language 'plpgsql'; - +select define_function_args('content_extlink__is_extlink','item_id'); create or replace function content_extlink__is_extlink (integer) returns boolean as ' declare @@ -166,6 +168,8 @@ return 0; end;' language 'plpgsql' stable; + +select define_function_args('content_extlink__copy','extlink_id,target_folder_id,creation_user,creation_ip,name'); create or replace function content_extlink__copy ( integer, integer, Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql,v diff -u -r1.39 -r1.40 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 29 Jun 2004 10:17:36 -0000 1.39 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 1 Jul 2004 16:33:38 -0000 1.40 @@ -12,6 +12,7 @@ -- create or replace package body content_folder + create or replace function content_folder__new(varchar,varchar,varchar,integer,integer) returns integer as ' declare @@ -81,6 +82,7 @@ new__creation_date, new__creation_user, new__creation_ip, + 't', null::integer ); @@ -104,85 +106,21 @@ v_context_id acs_objects.context_id%TYPE; v_package_id acs_objects.package_id%TYPE; begin - - -- set the context_id - if new__context_id is null then - v_context_id := new__parent_id; - else - v_context_id := new__context_id; - end if; - - -- parent_id = 0 means that this is a mount point - if new__parent_id != 0 and - content_folder__is_registered(new__parent_id,''content_folder'',''f'') = ''f'' then - - raise EXCEPTION ''-20000: This folder does not allow subfolders to be created''; - return null; - - else - - v_package_id := new__package_id; - - if new__parent_id is not null and new__parent_id not in (-100,-200) and new__package_id is null then - v_package_id := acs_object__package_id(content_item__get_root_folder(new__parent_id)); - end if; - - v_folder_id := content_item__new( - new__name, - new__parent_id, - new__folder_id, - null, - new__creation_date, - new__creation_user, - v_context_id, - new__creation_ip, - ''content_folder'', - ''content_folder'', - null, - null, - ''text/plain'', - null, - null, - ''text'', - v_package_id - ); - - insert into cr_folders ( - folder_id, label, description, package_id - ) values ( - v_folder_id, new__label, new__description, v_package_id - ); - - -- set the correct object title - update acs_objects - set title = new__label - where object_id = v_folder_id; - - -- inherit the attributes of the parent folder - if new__parent_id is not null then - - insert into cr_folder_type_map - select - v_folder_id as folder_id, content_type - from - cr_folder_type_map - where - folder_id = new__parent_id; - end if; - - -- update the child flag on the parent - update cr_folders set has_child_folders = ''t'' - where folder_id = new__parent_id; - - return v_folder_id; - - end if; - - return null; + return content_folder__new(new__name, + new__label, + new__description, + new__parent_id, + new__context_id, + new__folder_id, + new__creation_date, + new__creation_user, + new__creation_ip, + 't', + new__package_id + ); end;' language 'plpgsql'; -- function new -- accepts security_inherit_p DaveB - select define_function_args('content_folder__new','name,label,description,parent_id,context_id,folder_id,creation_date;now,creation_user,creation_ip,security_inherit_p;t,package_id'); create or replace function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,boolean,integer) @@ -305,12 +243,13 @@ new__creation_user, new__creation_ip, new__security_inherit_p, - null + null::integer ); end;' language 'plpgsql'; -- procedure delete +select define_function_args('content_folder__delete','folder_id,cascade_p;f'); create or replace function content_folder__delete (integer, boolean) returns integer as ' @@ -392,6 +331,7 @@ -- procedure rename +select define_function_args('content_folder__edit_name','folder_id,name,label,description'); create or replace function content_folder__edit_name (integer,varchar,varchar,varchar) returns integer as ' declare @@ -440,6 +380,8 @@ -- 3) update the parent_id for the folder -- procedure move +select define_function_args('content_folder__move','folder_id,target_folder_id'); + create or replace function content_folder__move (integer,integer) returns integer as ' declare @@ -645,6 +587,7 @@ -- function is_folder +select define_function_args('content_folder__is_folder','folder_id'); create or replace function content_folder__is_folder (integer) returns boolean as ' declare @@ -658,6 +601,7 @@ -- function is_sub_folder +select define_function_args('content_folder__is_sub_folder','folder_id,target_folder_id'); create or replace function content_folder__is_sub_folder (integer,integer) returns boolean as ' declare @@ -703,6 +647,7 @@ -- function is_empty +select define_function_args('content_folder__is_empty','folder_id'); create or replace function content_folder__is_empty (integer) returns boolean as ' declare @@ -723,6 +668,8 @@ -- procedure register_content_type +select define_function_args('content_folder__register_content_type','folder_id,content_type,include_subtypes;f'); + create or replace function content_folder__register_content_type (integer,varchar,boolean) returns integer as ' declare @@ -788,6 +735,7 @@ -- procedure unregister_content_type +select define_function_args('content_folder__unregister_content_type','folder_id,content_type,include_subtypes;f'); create or replace function content_folder__unregister_content_type (integer,varchar,boolean) returns integer as ' declare @@ -826,6 +774,7 @@ -- function is_registered +select define_function_args('content_folder__is_registered','folder_id,content_type,include_subtypes;f'); create or replace function content_folder__is_registered (integer,varchar,boolean) returns boolean as ' declare @@ -885,6 +834,7 @@ -- function get_label +select define_function_args('content_folder__get_label','folder_id'); create or replace function content_folder__get_label (integer) returns varchar as ' declare @@ -905,6 +855,7 @@ -- function get_index_page +select define_function_args('content_folder__get_index_page','folder_id'); create or replace function content_folder__get_index_page (integer) returns integer as ' declare @@ -947,6 +898,7 @@ -- function is_root +select define_function_args('content_folder__is_root','folder_id'); create or replace function content_folder__is_root (integer) returns boolean as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v diff -u -r1.55 -r1.56 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 29 Jun 2004 10:17:36 -0000 1.55 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 1 Jul 2004 16:33:38 -0000 1.56 @@ -13,6 +13,7 @@ create or replace view content_item_globals as select -100 as c_root_folder_id; +select define_function_args('content_item__get_root_folder','item_id'); create or replace function content_item__get_root_folder (integer) returns integer as ' declare @@ -983,6 +984,7 @@ end;' language 'plpgsql'; +select define_function_args('content_item__is_published','item_id'); create or replace function content_item__is_published (integer) returns boolean as ' declare @@ -1003,6 +1005,7 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__is_publishable','item_id'); create or replace function content_item__is_publishable (integer) returns boolean as ' declare @@ -1119,6 +1122,8 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__is_valid_child','item_id,content_type,relation_tag'); + create or replace function content_item__is_valid_child (integer,varchar,varchar) returns boolean as ' declare @@ -1180,6 +1185,7 @@ end;' language 'plpgsql' stable; + create or replace function content_item__is_valid_child (integer,varchar) returns boolean as ' declare @@ -1243,6 +1249,9 @@ 6) delete keyword associations 7) delete all associated comments */ + +select define_function_args('content_item__delete','item_id'); + create or replace function content_item__delete (integer) returns integer as ' declare @@ -1368,6 +1377,8 @@ end;' language 'plpgsql'; +select define_function_args('content_item__edit_name','item_id,name'); + create or replace function content_item__edit_name (integer,varchar) returns integer as ' declare @@ -1407,6 +1418,8 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_item__get_id','item_path,root_folder_id,resolve_index;f'); + create or replace function content_item__get_id (varchar,integer,boolean) returns integer as ' declare @@ -1755,6 +1768,8 @@ -- return v_path; -- end;' language 'plpgsql'; + +select define_function_args('content_item__get_path','item_id,root_folder_id'); create or replace function content_item__get_path (integer,integer) returns varchar as ' declare @@ -1845,6 +1860,8 @@ end;' language 'plpgsql'; +-- I hard code the content_item_globals.c_root_folder_id here +select define_function_args('content_item__get_virtual_path','item_id,root_folder_id;-100'); create or replace function content_item__get_virtual_path (integer,integer) returns varchar as ' @@ -1875,7 +1892,6 @@ end;' language 'plpgsql'; - create or replace function content_item__write_to_file (integer,varchar) returns integer as ' declare @@ -1902,6 +1918,7 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_item__register_template','item_id,template_id,use_context'); create or replace function content_item__register_template (integer,integer,varchar) returns integer as ' @@ -1935,6 +1952,7 @@ end;' language 'plpgsql'; +select define_function_args('content_item__unregister_template','item_id,template_id,use_context'); create or replace function content_item__unregister_template (integer,integer,varchar) returns integer as ' declare @@ -1974,6 +1992,7 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_item__get_template','item_id,use_context'); create or replace function content_item__get_template (integer,varchar) returns integer as ' @@ -2021,7 +2040,7 @@ end;' language 'plpgsql' stable strict; - +select define_function_args('content_item__get_content_type','item_id'); create or replace function content_item__get_content_type (integer) returns varchar as ' declare @@ -2041,6 +2060,8 @@ end;' language 'plpgsql' stable strict; +select define_function_args('content_item__get_live_revision','item_id'); + create or replace function content_item__get_live_revision (integer) returns integer as ' declare @@ -2089,6 +2110,7 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_item__set_live_revision','item_id,publish_status;ready'); create or replace function content_item__set_live_revision (integer,varchar) returns integer as ' declare @@ -2119,7 +2141,7 @@ return 0; end;' language 'plpgsql'; - +select define_function_args('content_item__unset_live_revision','item_id'); create or replace function content_item__unset_live_revision (integer) returns integer as ' declare @@ -2146,6 +2168,8 @@ return 0; end;' language 'plpgsql'; +select define_function_args('content_item__set_release_period','item_id,start_when,end_when'); + create or replace function content_item__set_release_period (integer, timestamptz, timestamptz) returns integer as ' declare @@ -2178,6 +2202,8 @@ end;' language 'plpgsql'; +select define_function_args('content_item__get_revision_count','item_id'); + create or replace function content_item__get_revision_count (integer) returns integer as ' declare @@ -2197,6 +2223,7 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__get_context','item_id'); create or replace function content_item__get_context (integer) returns integer as ' declare @@ -2241,6 +2268,7 @@ return null; end;' language 'plpgsql'; +select define_function_args('content_item__move','item_id,target_folder_id,name'); create or replace function content_item__move (integer,integer,varchar) returns integer as ' declare @@ -2340,6 +2368,7 @@ end;' language 'plpgsql'; +select define_function_args('content_item__copy','item_id,target_folder_id,creation_user,creation_ip,name'); create or replace function content_item__copy ( integer, integer, @@ -2474,6 +2503,7 @@ end;' language 'plpgsql'; +select define_function_args('content_item__get_latest_revision','item_id'); create or replace function content_item__get_latest_revision (integer) returns integer as ' declare @@ -2502,6 +2532,7 @@ end;' language 'plpgsql' strict stable; +select define_function_args('content_item__get_best_revision','item_id'); create or replace function content_item__get_best_revision (integer) returns integer as ' declare @@ -2523,6 +2554,7 @@ end;' language 'plpgsql' stable strict; +select define_function_args('content_item__get_title','item_id,is_live;f'); create or replace function content_item__get_title (integer,boolean) returns varchar as ' declare @@ -2581,6 +2613,7 @@ end;' language 'plpgsql' stable strict; +select define_function_args('content_item__get_publish_date','item_id,is_live;f'); create or replace function content_item__get_publish_date (integer,boolean) returns timestamptz as ' @@ -2616,6 +2649,7 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__is_subclass','object_type,supertype'); create or replace function content_item__is_subclass (varchar,varchar) returns boolean as ' declare @@ -2636,6 +2670,8 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n,relation_type;cr_item_rel'); + create or replace function content_item__relate (integer,integer,varchar,integer,varchar) returns integer as ' declare @@ -2742,6 +2778,8 @@ end;' language 'plpgsql'; +select define_function_args('content_item__unrelate','rel_id'); + create or replace function content_item__unrelate (integer) returns integer as ' declare @@ -2758,6 +2796,8 @@ end;' language 'plpgsql'; +select define_function_args('content_item__is_index_page','item_id,folder_id'); + create or replace function content_item__is_index_page (integer,integer) returns boolean as ' declare @@ -2772,6 +2812,8 @@ end;' language 'plpgsql' stable; +select define_function_args('content_item__get_parent_folder','item_id'); + create or replace function content_item__get_parent_folder (integer) returns integer as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 12 Mar 2004 19:19:46 -0000 1.37 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 1 Jul 2004 16:33:38 -0000 1.38 @@ -301,6 +301,7 @@ -- procedure copy_attributes +select define_function_args('content_revision__copy_attributes','content_type,revision_id,copy_id'); create or replace function content_revision__copy_attributes (varchar,integer,integer) returns integer as ' declare @@ -340,6 +341,7 @@ -- function copy +select define_function_args('content_revision__copy','revision_id,copy_id,target_item_id,creation_user,creation_ip'); create or replace function content_revision__copy (integer,integer,integer,integer,varchar) returns integer as ' declare @@ -444,6 +446,7 @@ -- procedure delete +select define_function_args('content_revision__delete','revision_id'); create or replace function content_revision__delete (integer) returns integer as ' declare @@ -508,6 +511,7 @@ -- function get_number +select define_function_args('content_revision__get_number','revision_id'); create or replace function content_revision__get_number (integer) returns integer as ' declare @@ -539,6 +543,8 @@ end;' language 'plpgsql' stable strict; + +select define_function_args('content_revision__revision_name','revision_id'); create or replace function content_revision__revision_name(integer) returns text as ' declare @@ -596,6 +602,7 @@ -- procedure to_html +select define_function_args('content_revision__to_html','revision_id'); create or replace function content_revision__to_html (integer) returns integer as ' declare @@ -624,6 +631,7 @@ -- function is_live +select define_function_args('content_revision__is_live','revision_id'); create or replace function content_revision__is_live (integer) returns boolean as ' declare @@ -637,6 +645,7 @@ -- function is_latest +select define_function_args('content_revision__is_latest','revision_id'); create or replace function content_revision__is_latest (integer) returns boolean as ' declare @@ -679,6 +688,7 @@ -- procedure content_copy +select define_function_args('content_revision__content_copy','revision_id,revision_id_dest'); create or replace function content_revision__content_copy (integer,integer) returns integer as ' declare @@ -770,6 +780,7 @@ -- procedure content__get_content +select define_function_args('content_revision__get_content','revision_id'); create or replace function content_revision__get_content (integer) returns text as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 12 Mar 2004 18:48:47 -0000 1.18 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 1 Jul 2004 16:33:38 -0000 1.19 @@ -12,7 +12,7 @@ -- create or replace package body content_symlink -- function new -select define_function_args('content_symlink__new','name,label,target_id,parent_id,symlink_id,creation_date;now,creation_user,creation_ip'); +select define_function_args('content_symlink__new','name,label,target_id,parent_id,symlink_id,creation_date;now,creation_user,creation_ip,package_id'); create or replace function content_symlink__new (varchar,varchar,integer,integer,integer,timestamptz,integer,varchar,integer) returns integer as ' @@ -148,6 +148,7 @@ end;' language 'plpgsql'; -- procedure delete +select define_function_args('content_symlink__delete','symlink_id'); create or replace function content_symlink__delete (integer) returns integer as ' declare @@ -164,6 +165,7 @@ -- function is_symlink +select define_function_args('content_symlink__is_symlink','item_id'); create or replace function content_symlink__is_symlink (integer) returns boolean as ' declare @@ -184,6 +186,7 @@ -- procedure copy +select define_function_args('content_symlink__copy','symlink_id,target_folder_id,creation_user,creation_ip,name'); create or replace function content_symlink__copy ( integer, integer, @@ -284,6 +287,7 @@ end;' language 'plpgsql'; -- function resolve +select define_function_args('content_symlink__resolve','item_id'); create or replace function content_symlink__resolve (integer) returns integer as ' declare @@ -308,6 +312,7 @@ -- function resolve_content_type +select define_function_args('content_symlink__resolve_content_type','item_id'); create or replace function content_symlink__resolve_content_type (integer) returns varchar as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 12 Mar 2004 19:19:46 -0000 1.16 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 1 Jul 2004 16:33:38 -0000 1.17 @@ -13,6 +13,7 @@ create view content_template_globals as select -200 as c_root_folder_id; +-- dont need a define_func_args for empty funcs... create or replace function content_template__get_root_folder() returns integer as ' begin return content_template_globals.c_root_folder_id; @@ -264,6 +265,7 @@ -- procedure delete +select define_function_args('content_template__delete','template_id'); create or replace function content_template__delete (integer) returns integer as ' declare @@ -286,6 +288,7 @@ -- function is_template +select define_function_args('content_template__is_template','template_id'); create or replace function content_template__is_template (integer) returns boolean as ' declare @@ -299,6 +302,7 @@ -- function get_path +select define_function_args('content_template__get_path','template_id,root_folder_id;-200'); create or replace function content_template__get_path (integer,integer) returns varchar as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql 2 Jun 2004 20:54:15 -0000 1.36 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql 1 Jul 2004 16:33:38 -0000 1.37 @@ -206,9 +206,10 @@ return 0; end;' language 'plpgsql'; -select define_function_args('content_type__create_attribute','content_type,attribute_name,datatype,pretty_name,pretty_plural,sort_order,default_value,column_spec;text'); -- function create_attribute + +select define_function_args('content_type__create_attribute','content_type,attribute_name,datatype,pretty_name,pretty_plural,sort_order,default_value,column_spec;text'); create or replace function content_type__create_attribute (varchar,varchar,varchar,varchar,varchar,integer,varchar,varchar) returns integer as ' declare @@ -323,6 +324,7 @@ -- procedure register_template +select define_function_args('content_type__register_template','content_type,template_id,use_context,is_default;f'); create or replace function content_type__register_template (varchar,integer,varchar,boolean) returns integer as ' declare @@ -375,6 +377,7 @@ -- procedure set_default_template +select define_function_args('content_type__set_default_template','content_type,template_id,use_context'); create or replace function content_type__set_default_template (varchar,integer,varchar) returns integer as ' declare @@ -404,6 +407,7 @@ -- function get_template +select define_function_args('content_type__get_template','content_type,use_context'); create or replace function content_type__get_template (varchar,varchar) returns integer as ' declare @@ -430,6 +434,7 @@ -- procedure unregister_template +select define_function_args('content_type__unregister_template','content_type,template_id,use_context'); create or replace function content_type__unregister_template (varchar,integer,varchar) returns integer as ' declare @@ -470,6 +475,7 @@ -- function trigger_insert_statement +select define_function_args('content_type__trigger_insert_statement','content_type'); create or replace function content_type__trigger_insert_statement (varchar) returns varchar as ' declare @@ -552,6 +558,7 @@ -- revisions for any content type -- procedure refresh_trigger +select define_function_args('content_type__refresh_trigger','content_type'); create or replace function content_type__refresh_trigger (varchar) returns integer as ' declare @@ -633,6 +640,7 @@ -- procedure refresh_view +select define_function_args('content_type__refresh_view','content_type'); create or replace function content_type__refresh_view (varchar) returns integer as ' declare @@ -749,6 +757,7 @@ -- procedure register_child_type +select define_function_args('content_type__register_child_type','content_type,child_type,relation_tag;generic,min_n;0,max_n'); create or replace function content_type__register_child_type (varchar,varchar,varchar,integer,integer) returns integer as ' declare @@ -796,6 +805,7 @@ -- procedure unregister_child_type +select define_function_args('content_type__unregister_child_type','content_type,child_type,relation_tag'); create or replace function content_type__unregister_child_type (varchar,varchar,varchar) returns integer as ' declare @@ -818,6 +828,8 @@ -- procedure register_relation_type +select define_function_args('content_type__register_relation_type','content_type,target_type,relation_tag;generic,min_n;0,max_n'); + create or replace function content_type__register_relation_type (varchar,varchar,varchar,integer,integer) returns integer as ' declare @@ -870,6 +882,8 @@ -- procedure unregister_relation_type +select define_function_args('content_type__unregister_relation_type','content_type,target_type,relation_tag;generic'); + create or replace function content_type__unregister_relation_type (varchar,varchar,varchar) returns integer as ' declare @@ -893,6 +907,7 @@ -- procedure register_mime_type +select define_function_args('content_type__register_mime_type','content_type,mime_type'); create or replace function content_type__register_mime_type (varchar,varchar) returns integer as ' declare @@ -930,6 +945,7 @@ -- procedure unregister_mime_type +select define_function_args('content_type__unregister_mime_type','content_type,mime_type'); create or replace function content_type__unregister_mime_type (varchar,varchar) returns integer as ' declare @@ -946,6 +962,8 @@ -- function is_content_type +select define_function_args('content_type__is_content_type','content_type'); + create or replace function content_type__is_content_type (varchar) returns boolean as ' declare @@ -970,6 +988,8 @@ -- procedure rotate_template +select define_function_args('content_type__rotate_template','template_id,content_type,use_context'); + create or replace function content_type__rotate_template (integer,varchar,varchar) returns integer as ' declare Index: openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.2.0d4-5.2.0d5.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.2.0d4-5.2.0d5.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.2.0d4-5.2.0d5.sql 1 Jul 2004 16:33:39 -0000 1.1 @@ -0,0 +1,89 @@ +-- define additional plpgsql +select define_function_args('content_item__delete','item_id'); +select define_function_args('content_item__copy','item_id,target_folder_id,creation_user,creation_ip,name'); +select define_function_args('content_item__get_parent_folder','item_id'); +select define_function_args('content_item__unrelate','rel_id'); +select define_function_args('content_item__is_index_page','item_id,folder_id'); +select define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n,relation_type;cr_item_rel'); +select define_function_args('content_item__is_subclass','object_type,supertype'); +select define_function_args('content_item__get_publish_date','item_id,is_live;f'); +select define_function_args('content_item__get_title','item_id,is_live;f'); +select define_function_args('content_item__get_best_revision','item_id'); +select define_function_args('content_item__get_latest_revision','item_id'); +select define_function_args('content_item__move','item_id,target_folder_id,name'); +select define_function_args('content_item__get_context','item_id'); +select define_function_args('content_item__get_revision_count','item_id'); +select define_function_args('content_item__set_release_period','item_id,start_when,end_when'); +select define_function_args('content_item__unset_live_revision','item_id'); +select define_function_args('content_item__set_live_revision','item_id,publish_status;ready'); +select define_function_args('content_item__get_live_revision','item_id'); +select define_function_args('content_item__get_content_type','item_id'); +select define_function_args('content_item__get_template','item_id,use_context'); +select define_function_args('content_item__unregister_template','item_id,template_id,use_context'); +select define_function_args('content_item__register_template','item_id,template_id,use_context'); +select define_function_args('content_item__get_virtual_path','item_id,root_folder_id;-100'); +select define_function_args('content_item__get_path','item_id,root_folder_id'); +select define_function_args('content_item__get_id','item_path,root_folder_id,resolve_index;f'); +select define_function_args('content_item__edit_name','item_id,name'); +select define_function_args('content_item__is_valid_child','item_id,content_type,relation_tag'); +select define_function_args('content_item__is_publishable','item_id'); +select define_function_args('content_item__is_published','item_id'); +select define_function_args('content_item__get_root_folder','item_id'); + +select define_function_args('content_revision__get_content','revision_id'); +select define_function_args('content_revision__content_copy','revision_id,revision_id_dest'); +select define_function_args('content_revision__is_latest','revision_id'); +select define_function_args('content_revision__is_live','revision_id'); +select define_function_args('content_revision__to_html','revision_id'); +select define_function_args('content_revision__revision_name','revision_id'); +select define_function_args('content_revision__get_number','revision_id'); +select define_function_args('content_revision__delete','revision_id'); +select define_function_args('content_revision__copy','revision_id,copy_id,target_item_id,creation_user,creation_ip'); +select define_function_args('content_revision__copy_attributes','content_type,revision_id,copy_id'); + +select define_function_args('content_type__rotate_template','template_id,content_type,use_context'); +select define_function_args('content_type__is_content_type','content_type'); +select define_function_args('content_type__unregister_mime_type','content_type,mime_type'); +select define_function_args('content_type__register_mime_type','content_type,mime_type'); +select define_function_args('content_type__unregister_relation_type','content_type,target_type,relation_tag;generic'); +select define_function_args('content_type__register_relation_type','content_type,target_type,relation_tag;generic,min_n;0,max_n'); +select define_function_args('content_type__unregister_child_type','content_type,child_type,relation_tag'); +select define_function_args('content_type__register_child_type','content_type,child_type,relation_tag;generic,min_n;0,max_n'); +select define_function_args('content_type__refresh_view','content_type'); +select define_function_args('content_type__refresh_trigger','content_type'); +select define_function_args('content_type__trigger_insert_statement','content_type'); +select define_function_args('content_type__unregister_template','content_type,template_id,use_context'); +select define_function_args('content_type__get_template','content_type,use_context'); +select define_function_args('content_type__set_default_template','content_type,template_id,use_context'); +select define_function_args('content_type__register_template','content_type,template_id,use_context,is_default;f'); + + + +select define_function_args('content_folder__delete','folder_id,cascade_p;f'); +select define_function_args('content_folder__register_content_type','folder_id,content_type,include_subtypes;f'); +select define_function_args('content_folder__is_root','folder_id'); +select define_function_args('content_folder__get_index_page','folder_id'); +select define_function_args('content_folder__get_label','folder_id'); +select define_function_args('content_folder__is_registered','folder_id,content_type,include_subtypes;f'); +select define_function_args('content_folder__unregister_content_type','folder_id,content_type,include_subtypes;f'); +select define_function_args('content_folder__is_empty','folder_id'); +select define_function_args('content_folder__is_sub_folder','folder_id,target_folder_id'); +select define_function_args('content_folder__is_folder','folder_id'); +select define_function_args('content_folder__edit_name','folder_id,name,label,description'); +select define_function_args('content_folder__move','folder_id,target_folder_id'); + +select define_function_args('content_template__get_path','template_id,root_folder_id;-100'); +select define_function_args('content_template__is_template','template_id'); +select define_function_args('content_template__delete','template_id'); + +select define_function_args('content_symlink__resolve','item_id'); +select define_function_args('content_symlink__resolve_content_type','item_id'); +select define_function_args('content_symlink__is_symlink','item_id'); +select define_function_args('content_symlink__copy','symlink_id,target_folder_id,creation_user,creation_ip,name'); +select define_function_args('content_symlink__new','name,label,target_id,parent_id,symlink_id,creation_date;now,creation_user,creation_ip,package_id'); + +select define_function_args('content_extlink__copy','extlink_id,target_folder_id,creation_user,creation_ip,name'); +select define_function_args('content_extlink__is_extlink','item_id'); +select define_function_args('content_extlink__delete','extlink_id'); +select define_function_args('content_extlink__new','name,url,label,description,parent_id,extlink_id,creation_date;now,creation_user,creation_ip,package_id'); + Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 28 Jun 2004 15:41:10 -0000 1.4 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 1 Jul 2004 16:33:39 -0000 1.5 @@ -88,7 +88,7 @@ # the content type is not the object type of the cr_item so we pass in # the cr_item subtype here and content_type as part of # var_list - ns_log notice " + ns_log Debug " DB -------------------------------------------------------------------------------- DB DAVE debugging /var/lib/aolserver/ctk/packages/acs-content-repository/tcl/content-item-procs.tcl DB -------------------------------------------------------------------------------- @@ -109,10 +109,9 @@ Delete a content item @param item_id } { - set var_list [list [list item_id $item_id]] package_exec_plsql \ - -var_list $var_list \ - "content_item" "delete" + -var_list [list [list item_id $item_id]] \ + content_item delete } ad_proc -public ::content::item::rename {