Index: openacs-4/packages/dotlrn/sql/postgresql/admins-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/admins-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/admins-package-create.sql 8 Jul 2002 21:04:14 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/admins-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -26,7 +26,7 @@ select define_function_args ('dotlrn_admin_profile_rel__delete','rel_id'); -create function dotlrn_admin_profile_rel__new(integer,integer,integer,integer,integer,varchar,integer,integer,varchar) +create function dotlrn_admin_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar) returns integer as ' DECLARE p_rel_id alias for $1; @@ -59,6 +59,7 @@ p_theme_id, p_id, p_rel_type, + v_group_id, p_creation_user, p_creation_ip ); Index: openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql 11 Jul 2002 15:54:13 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql 12 Jul 2002 21:26:48 -0000 1.3 @@ -338,9 +338,9 @@ return v_node_id; - exception - when no_data_found then - return ''; +-- exception +-- when no_data_found then +-- return ''; END; ' language 'plpgsql'; Index: openacs-4/packages/dotlrn/sql/postgresql/communities-tree-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-tree-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/communities-tree-create.sql 11 Jul 2002 15:54:13 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/communities-tree-create.sql 12 Jul 2002 21:26:48 -0000 1.3 @@ -34,7 +34,7 @@ end if; -- increment the sort_key - v_max_child_sortkey := tree__increment_key(v_max_child_sortkey); + v_max_child_sortkey := tree_increment_key(v_max_child_sortkey); update dotlrn_community_types set max_child_sortkey = v_max_child_sortkey Index: openacs-4/packages/dotlrn/sql/postgresql/externals-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/externals-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/externals-package-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/externals-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -26,7 +26,7 @@ select define_function_args ('dotlrn_external_profile_rel__delete','rel_id'); -create function dotlrn_external_profile_rel__new(integer,integer,integer,integer,integer,varchar,integer,integer,varchar) +create function dotlrn_external_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar) returns integer as ' DECLARE p_rel_id alias for $1; Index: openacs-4/packages/dotlrn/sql/postgresql/professors-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/professors-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/professors-package-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/professors-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -26,14 +26,14 @@ select define_function_args ('dotlrn_professor_profile_rel__delete','rel_id'); -create function dotlrn_professor_profile_rel__new(integer,integer,integer,integer,integer,integer,integer,varchar) +create function dotlrn_professor_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar) returns integer as ' DECLARE p_rel_id alias for $1; p_user_id alias for $2; - p_portal_id alias_for $3; - p_theme_id alias_for $4; - p_id alias_for $5; + p_portal_id alias for $3; + p_theme_id alias for $4; + p_id alias for $5; p_rel_type alias for $6; p_group_id alias for $7; p_creation_user alias for $8; Index: openacs-4/packages/dotlrn/sql/postgresql/students-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/students-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/students-package-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/students-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -26,17 +26,18 @@ select define_function_args ('dotlrn_student_profile_rel__delete','rel_id'); -create function dotlrn_student_profile_rel__new(integer,integer,integer,integer,varchar,integer,integer,varchar,integer,integer) +create function dotlrn_student_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar) returns integer as ' DECLARE p_rel_id alias for $1; p_user_id alias for $2; p_portal_id alias for $3; p_theme_id alias for $4; - p_rel_type alias for $5; - p_group_id alias for $6; - p_creation_user alias for $7; - p_creation_ip alias for $8; + p_id alias for $5; + p_rel_type alias for $6; + p_group_id alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; v_rel_id dotlrn_user_profile_rels.rel_id%TYPE; v_group_id groups.group_id%TYPE; BEGIN @@ -51,12 +52,23 @@ v_group_id := p_group_id; end if; +-- v_rel_id := dotlrn_user_profile_rel__new( +-- p_rel_id, +-- p_id, +-- p_rel_type, +-- v_group_id, +-- p_user_id, +-- p_creation_user, +-- p_creation_ip +-- ); v_rel_id := dotlrn_user_profile_rel__new( - p_rel_id, + v_rel_id, + p_user_id, + p_portal_id, + p_theme_id, p_id, p_rel_type, v_group_id, - p_user_id, p_creation_user, p_creation_ip ); Index: openacs-4/packages/dotlrn/sql/postgresql/users-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/users-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/users-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/users-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -53,6 +53,8 @@ create view dotlrn_users as select acs_rels.rel_id, + dotlrn_user_profile_rels.portal_id, + dotlrn_user_profile_rels.theme_id, dotlrn_user_profile_rels.id, users.user_id, persons.first_names, Index: openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql 8 Jul 2002 21:04:16 -0000 1.1 +++ openacs-4/packages/dotlrn/sql/postgresql/users-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -26,16 +26,18 @@ select define_function_args ('dotlrn_user_profile_rel__delete','rel_id'); -create function dotlrn_user_profile_rel__new(integer,varchar,varchar,integer,integer,integer,varchar) +create function dotlrn_user_profile_rel__new(integer,integer,integer,integer,varchar,varchar,integer,integer,varchar) returns integer as ' DECLARE p_rel_id alias for $1; - p_id alias for $2; - p_rel_type alias for $3; - p_group_id alias for $4; - p_user_id alias for $5; - p_creation_user alias for $6; - p_creation_ip alias for $7; + p_user_id alias for $2; + p_portal_id alias for $3; + p_theme_id alias for $4; + p_id alias for $5; + p_rel_type alias for $6; + p_group_id alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; v_rel_id user_profile_rels.rel_id%TYPE; v_group_id groups.group_id%TYPE; BEGIN @@ -61,9 +63,9 @@ insert into dotlrn_user_profile_rels - (rel_id, id) + (rel_id, portal_id, theme_id, id) values - (v_rel_id, p_id); + (v_rel_id, p_portal_id, p_theme_id, p_id); return v_rel_id; END; @@ -96,14 +98,14 @@ returns integer as ' DECLARE p_rel_id alias for $1; - p_portal_id alias for $2; - p_theme_id alias for $3; - p_id alias for $4; - p_rel_type alias for $5; - p_group_id alias for $6; - p_user_id alias for $7; - p_creation_user alias for $8; - p_creation_ip alias for $9; + p_portal_id alias for $2; + p_theme_id alias for $3; + p_id alias for $4; + p_rel_type alias for $5; + p_group_id alias for $6; + p_user_id alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; v_rel_id dotlrn_user_profile_rels.rel_id%TYPE; v_group_id groups.group_id%TYPE; BEGIN Index: openacs-4/packages/dotlrn/tcl/community-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/tcl/community-procs-postgresql.xql 11 Jul 2002 15:54:13 -0000 1.1 +++ openacs-4/packages/dotlrn/tcl/community-procs-postgresql.xql 12 Jul 2002 21:26:48 -0000 1.2 @@ -13,7 +13,7 @@ - :1 := dotlrn_community_type__new( + select dotlrn_community_type__new( :community_type_key, :parent_type, :pretty_name, @@ -25,7 +25,7 @@ - :1 := dotlrn_community__new( + select dotlrn_community__new( :community_type, :name :pretty_name, @@ -37,7 +37,7 @@ - dotlrn_community__set_active_dates( + select dotlrn_community__set_active_dates( :community_id, to_date(:start_date, :date_format), to_date(:end_date, :date_format) @@ -66,7 +66,7 @@ select dotlrn_community_types.community_type from dotlrn_community_types - where dotlrn_community_types.tree_sortkey = (select tree__ancestor_key(dotlrn_communities.tree_sortkey, 1) + where dotlrn_community_types.tree_sortkey = (select tree_ancestor_key(dotlrn_communities.tree_sortkey, 1) from dotlrn_communities where dotlrn_communities.community_id = :community_id) @@ -76,7 +76,7 @@ select dotlrn_community_types.community_type from dotlrn_community_types - where dotlrn_community_types.tree_sortkey = (select tree__ancestor_key(dct.tree_sortkey, 1) + where dotlrn_community_types.tree_sortkey = (select tree_ancestor_key(dct.tree_sortkey, 1) from dotlrn_community_types dct where dct.community_type = :community_type) Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.156 -r1.157 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 11 Jul 2002 04:30:33 -0000 1.156 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 12 Jul 2002 21:26:48 -0000 1.157 @@ -1716,19 +1716,19 @@ } db_dml update_portal_id { - update dotlrn_communities + update dotlrn_communities_all set portal_id = NULL where community_id = :community_id } db_dml update_admin_portal_id { - update dotlrn_communities + update dotlrn_communities_all set admin_portal_id = NULL where community_id = :community_id } db_dml update_non_member_portal_id { - update dotlrn_communities + update dotlrn_communities_all set non_member_portal_id = NULL where community_id = :community_id } Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.72 -r1.73 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 13 Jun 2002 04:35:59 -0000 1.72 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 12 Jul 2002 21:26:48 -0000 1.73 @@ -28,7 +28,7 @@ - update dotlrn_communities set package_id= :package_id where community_id= :community_id + update dotlrn_communities_all set package_id= :package_id where community_id= :community_id @@ -79,7 +79,7 @@ - update dotlrn_communities + update dotlrn_communities_all set portal_id = :portal_id, non_member_portal_id = :non_member_portal_id, admin_portal_id = :admin_portal_id @@ -325,7 +325,7 @@ - update dotlrn_communities + update dotlrn_communities_all set pretty_name = :pretty_name where community_id = :community_id @@ -349,7 +349,7 @@ - update dotlrn_communities + update dotlrn_communities_all set description = :description where community_id = :community_id @@ -398,7 +398,7 @@ - update dotlrn_communities + update dotlrn_communities_all set portal_id = :portal_id, non_member_portal_id = :non_member_portal_id, admin_portal_id = :admin_portal_id @@ -408,13 +408,13 @@ - update dotlrn_communities set archived_p = 't' where community_id = :community_id + update dotlrn_communities_all set archived_p = 't' where community_id = :community_id - update dotlrn_communities set archived_p = 'f' where community_id = :community_id + update dotlrn_communities_all set archived_p = 'f' where community_id = :community_id Index: openacs-4/packages/new-portal/sql/postgresql/api-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/postgresql/api-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/new-portal/sql/postgresql/api-create.sql 11 Jul 2002 20:16:43 -0000 1.7 +++ openacs-4/packages/new-portal/sql/postgresql/api-create.sql 12 Jul 2002 21:26:48 -0000 1.8 @@ -32,22 +32,24 @@ p_pretty_name alias for $2; p_portal_id alias for $3; p_layout_id alias for $4; - p_object_type alias for $6; - p_creation_date alias for $7; - p_create_user alias for $8; - p_creation_ip alias for $9; - p_context_id alias for $10; + p_object_type alias for $5; + p_creation_date alias for $6; + p_creation_user alias for $7; + p_creation_ip alias for $8; + p_context_id alias for $9; v_page_id portal_pages.page_id%TYPE; v_layout_id portal_pages.layout_id%TYPE; v_sort_key portal_pages.sort_key%TYPE; begin v_page_id := acs_object__new( + null, p_object_type, p_creation_date, p_creation_user, p_creation_ip, - p_context_id + p_context_id, + ''t'' ); if p_layout_id is null then @@ -145,6 +147,10 @@ v_layout_id portal_layouts.layout_id%TYPE; v_page_id portal_pages.page_id%TYPE; v_page record; + v_element record; + v_param record; + v_new_element_id integer; + v_new_parameter_id integer; begin v_portal_id := acs_object__new( @@ -153,7 +159,8 @@ p_creation_date, p_creation_user, p_creation_ip, - p_context_id + p_context_id, + ''t'' ); if p_template_id is null then @@ -182,9 +189,11 @@ -- now insert the default page v_page_id := portal_page__new( - v_portal_id, + null, p_default_page_name, + v_portal_id, v_layout_id, + ''portal_page'', p_creation_date, p_creation_user, p_creation_ip, @@ -213,18 +222,24 @@ loop v_page_id := portal_page__new( - v_portal_id, - v_page.pretty_name, - v_page.layout_id + null, + v_page.pretty_name, + v_portal_id, + v_page.layout_id, + ''portal_page'', + p_creation_date, + p_creation_user, + p_creation_ip, + p_context_id ); -- now get the elements on the templates page and put them on the new page - for element in select * + for v_element in select * from portal_element_map - where page_id = page.page_id + where page_id = v_page.page_id loop - select nextval(''acs_object_id_seq'') + select acs_object_id_seq.nextval into v_new_element_id from dual; @@ -233,15 +248,15 @@ (element_id, name, pretty_name, page_id, datasource_id, region, state, sort_key) select v_new_element_id, name, pretty_name, v_page_id, datasource_id, region, state, sort_key from portal_element_map pem - where pem.element_id = element.element_id; + where pem.element_id = v_element.element_id; -- now for the elements params - for param in select * + for v_param in select * from portal_element_parameters - where element_id = element.element_id + where element_id = v_element.element_id loop - select nextval(''acs_object_id_seq'') + select acs_object_id_seq.nextval into v_new_parameter_id from dual; @@ -250,7 +265,7 @@ (parameter_id, element_id, config_required_p, configured_p, key, value) select v_new_parameter_id, v_new_element_id, config_required_p, configured_p, key, value from portal_element_parameters - where parameter_id = param.parameter_id; + where parameter_id = v_param.parameter_id; end loop; @@ -310,7 +325,8 @@ p_creation_date, p_creation_user, p_creation_ip, - p_context_id + p_context_id, + ''t'' ); insert @@ -384,7 +400,8 @@ p_creation_date, p_creation_user, p_creation_ip, - p_context_id + p_context_id, + ''t'' ); insert into portal_layouts @@ -488,7 +505,8 @@ p_creation_date, p_creation_user, p_creation_ip, - p_context_id + p_context_id, + ''t'' ); insert into portal_datasources @@ -547,7 +565,7 @@ insert into portal_datasource_def_params (parameter_id, datasource_id, config_required_p, configured_p, key, value) values - (nextval(''acs_object_id_seq''), p_datasource_id, p_config_required_p, p_configured_p, p_key, p_value); + (acs_object_id_seq.nextval, p_datasource_id, p_config_required_p, p_configured_p, p_key, p_value); return 0; Index: openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql,v diff -u -r1.17 -r1.18 --- openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 11 Jun 2002 04:20:10 -0000 1.17 +++ openacs-4/packages/new-portal/tcl/portal-procs-oracle.xql 12 Jul 2002 21:26:48 -0000 1.18 @@ -3,11 +3,10 @@ oracle8.1.6 - + - begin - + begin :1 := portal.new ( name => :name, layout_id => :layout_id, @@ -16,27 +15,8 @@ theme_id => :theme_id, context_id => :context_id ); - - acs_permission.grant_permission ( - object_id => :1, - grantee_id => :user_id, - privilege => 'portal_read_portal' - ); - - acs_permission.grant_permission ( - object_id => :1, - grantee_id => :user_id, - privilege => 'portal_edit_portal' - ); + end; - acs_permission.grant_permission ( - object_id => :1, - grantee_id => :user_id, - privilege => 'portal_admin_portal' - ); - - end; - Index: openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 11 Jul 2002 19:19:06 -0000 1.6 +++ openacs-4/packages/new-portal/tcl/portal-procs-postgresql.xql 12 Jul 2002 21:26:48 -0000 1.7 @@ -3,49 +3,31 @@ postgresql7.1 - - - - begin + + - :1 := portal__new ( - /* name */ :name, - /* layout_id */ :layout_id, - /* template_id */ :template_id, - /* portal_template_p */ :portal_template_p, - /* default_page_name */ :default_page_name, - /* theme_id */ :theme_id, - /* context_id */ :context_id + select portal__new ( + null, + :name, + :theme_id, + :layout_id, + :template_id, + :default_page_name, + 'portal', + now(), + null, + null, + :context_id ); - - perform acs_permission__grant_permission ( - /* object_id */ :1, - /* grantee_id */ :user_id, - /* privilege */ 'portal_read_portal' - ); - - perform acs_permission__grant_permission ( - /* object_id */ :1, - /* grantee_id */ :user_id, - /* privilege */ 'portal_edit_portal' - ); - - if :portal_template_p = 't' then - acs_permission__grant_permission ( - /* object_id */ :1, - /* grantee_id */ :user_id, - /* privilege */ 'portal_admin_portal' - ); - end if; - - end; - - + + - select portal__delete (/* portal_id */ :portal_id); + begin + portal__delete (:portal_id); + end; @@ -55,9 +37,8 @@ set region = :region, page_id = :page_id, sort_key = (select coalesce((select max(pem.sort_key) + 1 - from portal_element_map pem, portal_pages pp - where pp.portal_id = :portal_id - and pp.page_id = pem.page_id + from portal_element_map pem + where pem.page_id = :page_id and region = :region), 1) from dual) @@ -85,10 +66,11 @@ insert into portal_element_map (element_id, name, pretty_name, page_id, datasource_id, region, sort_key) values - (:new_element_id, :ds_name, :ds_name, :page_id, :ds_id, :region, + (:new_element_id, :ds_name, :pretty_name, :page_id, :ds_id, :region, coalesce((select max(sort_key) + 1 from portal_element_map - where region = :region), 1)) + where region = :region + and page_id = :page_id), 1)) @@ -97,9 +79,8 @@ update portal_element_map set region = :target_region, sort_key = (select coalesce((select max(pem.sort_key) + 1 - from portal_element_map pem, portal_pages pp - where pp.portal_id = :portal_id - and pp.page_id = pem.page_id + from portal_element_map pem + where page_id = :my_page_id and region = :target_region), 1) from dual) @@ -108,15 +89,25 @@ - + + select portal_page__new ( + null, + :pretty_name, + :portal_id, + :layout_id, + 'portal_page', + now(), + null, + null, + null + ); + + - select portal_page__new ( - /* pretty_name */ :pretty_name, - /* portal_id */ :portal_id, - /* layout_id */ :layout_id - ); - - + + + select portal_page__delete ( :page_id ); + Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.152 -r1.153 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 28 Jun 2002 20:08:29 -0000 1.152 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 12 Jul 2002 21:26:48 -0000 1.153 @@ -191,8 +191,12 @@ db_transaction { # create the portal and the first page - set portal_id [db_exec_plsql create_new_portal_and_perms {}] + set portal_id [db_exec_plsql create_new_portal {}] + permission::grant -party_id $user_id -object_id $portal_id -privilege portal_read_portal + permission::grant -party_id $user_id -object_id $portal_id -privilege portal_edit_portal + permission::grant -party_id $user_id -object_id $portal_id -privilege portal_admin_portal + # ignore the csv list if we have a template if {![empty_string_p $csv_list] && [empty_string_p $template_id]} { # if there are more pages in the csv_list, create them Index: openacs-4/packages/new-portal/tcl/portal-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.xql,v diff -u -r1.38 -r1.39 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 29 Jun 2002 21:48:21 -0000 1.38 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 12 Jul 2002 21:26:48 -0000 1.39 @@ -327,7 +327,7 @@ insert into portal_element_parameters (parameter_id, element_id, config_required_p, configured_p, key, value) - select acs_object_id_seq.nextval, :new_element_id, config_required_p, configured_p, key, value + select nextval('t_acs_object_id_seq'), :new_element_id, config_required_p, configured_p, key, value from portal_element_parameters where element_id = :template_element_id @@ -337,7 +337,7 @@ insert into portal_element_parameters (parameter_id, element_id, config_required_p, configured_p, key, value) - select acs_object_id_seq.nextval, :new_element_id, config_required_p, configured_p, key, value + select nextval('t_acs_object_id_seq'), :new_element_id, config_required_p, configured_p, key, value from portal_datasource_def_params where datasource_id= :ds_id @@ -475,7 +475,7 @@ insert into portal_element_parameters (parameter_id, element_id, configured_p, key, value) - select acs_object_id_seq.nextval, :element_id, 't', :key, :value + select nextval('t_acs_object_id_seq'), :element_id, 't', :key, :value from dual where not exists (select parameter_id from portal_element_parameters where element_id= :element_id and key= :key and value= :value) Index: openacs-4/packages/user-profile/sql/postgresql/user-profile-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-profile/sql/postgresql/user-profile-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/user-profile/sql/postgresql/user-profile-package-create.sql 29 Mar 2002 16:56:10 -0000 1.1 +++ openacs-4/packages/user-profile/sql/postgresql/user-profile-package-create.sql 12 Jul 2002 21:26:48 -0000 1.2 @@ -51,7 +51,6 @@ (v_rel_id); return v_rel_id; - end; END; ' language 'plpgsql';