Index: openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql 9 Sep 2003 11:15:00 -0000 1.2 +++ openacs-4/packages/acs-kernel/sql/oracle/authentication-package-create.sql 9 Sep 2003 13:19:30 -0000 1.3 @@ -63,7 +63,17 @@ return integer is v_authority_id integer; + v_sort_order integer; begin + if sort_order is null then + select max(sort_order) + 1 + into v_sort_order + from auth_authorities; + else + v_sort_order := sort_order; + end if; + + v_authority_id := acs_object.new( object_id => new.authority_id, object_type => new.object_type, @@ -79,7 +89,7 @@ help_contact_text, get_doc_impl_id, process_doc_impl_id, snapshot_p, batch_sync_enabled_p) values (v_authority_id, new.short_name, new.pretty_name, new.enabled_p, - new.sort_order, new.auth_impl_id, new.pwd_impl_id, + v_sort_order, new.auth_impl_id, new.pwd_impl_id, new.forgotten_pwd_url, new.change_pwd_url, new.register_impl_id, new.help_contact_text, new.get_doc_impl_id, new.process_doc_impl_id, new.snapshot_p, new.batch_sync_enabled_p); Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql 9 Sep 2003 11:15:00 -0000 1.3 +++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql 9 Sep 2003 13:19:30 -0000 1.4 @@ -154,7 +154,17 @@ return integer is v_authority_id integer; + v_sort_order integer; begin + if sort_order is null then + select max(sort_order) + 1 + into v_sort_order + from auth_authorities; + else + v_sort_order := sort_order; + end if; + + v_authority_id := acs_object.new( object_id => new.authority_id, object_type => new.object_type, @@ -170,7 +180,7 @@ help_contact_text, get_doc_impl_id, process_doc_impl_id, snapshot_p, batch_sync_enabled_p) values (v_authority_id, new.short_name, new.pretty_name, new.enabled_p, - new.sort_order, new.auth_impl_id, new.pwd_impl_id, + v_sort_order, new.auth_impl_id, new.pwd_impl_id, new.forgotten_pwd_url, new.change_pwd_url, new.register_impl_id, new.help_contact_text, new.get_doc_impl_id, new.process_doc_impl_id, new.snapshot_p, new.batch_sync_enabled_p); Index: openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql 9 Sep 2003 11:15:00 -0000 1.2 +++ openacs-4/packages/acs-kernel/sql/postgresql/authentication-package-create.sql 9 Sep 2003 13:19:31 -0000 1.3 @@ -50,14 +50,22 @@ v_authority_id integer; v_object_type varchar; - + v_sort_order integer; + begin if p_object_type is null then v_object_type := ''authority''; else v_object_type := p_object_type; end if; + if p_sort_order is null then + select into v_sort_order max(sort_order) + 1 + from auth_authorities; + else + v_sort_order := p_sort_order; + end if; + -- Instantiate the ACS Object super type with auditing info v_authority_id := acs_object__new( p_authority_id, @@ -75,7 +83,7 @@ help_contact_text, get_doc_impl_id, process_doc_impl_id, snapshot_p, batch_sync_enabled_p) values (v_authority_id, p_short_name, p_pretty_name, p_enabled_p, - p_sort_order, p_auth_impl_id, p_pwd_impl_id, + v_sort_order, p_auth_impl_id, p_pwd_impl_id, p_forgotten_pwd_url, p_change_pwd_url, p_register_impl_id, p_help_contact_text, p_get_doc_impl_id, p_process_doc_impl_id, p_snapshot_p, p_batch_sync_enabled_p); Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql 9 Sep 2003 11:15:00 -0000 1.3 +++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql 9 Sep 2003 13:19:31 -0000 1.4 @@ -132,14 +132,22 @@ v_authority_id integer; v_object_type varchar; - + v_sort_order integer; + begin if p_object_type is null then v_object_type := ''authority''; else v_object_type := p_object_type; end if; + if p_sort_order is null then + select into v_sort_order max(sort_order) + 1 + from auth_authorities; + else + v_sort_order := p_sort_order; + end if; + -- Instantiate the ACS Object super type with auditing info v_authority_id := acs_object__new( p_authority_id, @@ -157,7 +165,7 @@ help_contact_text, get_doc_impl_id, process_doc_impl_id, snapshot_p, batch_sync_enabled_p) values (v_authority_id, p_short_name, p_pretty_name, p_enabled_p, - p_sort_order, p_auth_impl_id, p_pwd_impl_id, + v_sort_order, p_auth_impl_id, p_pwd_impl_id, p_forgotten_pwd_url, p_change_pwd_url, p_register_impl_id, p_help_contact_text, p_get_doc_impl_id, p_process_doc_impl_id, p_snapshot_p, p_batch_sync_enabled_p);