Index: openacs-4/packages/acs-subsite/tcl/package-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/package-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/tcl/package-procs-postgresql.xql 12 Aug 2001 21:11:03 -0000 1.5 +++ openacs-4/packages/acs-subsite/tcl/package-procs-postgresql.xql 9 Sep 2001 16:34:56 -0000 1.6 @@ -133,7 +133,7 @@ where object_type = :start_with)) t where a.object_type = :object_type and t.object_type = a.ancestor_type $storage_clause - order by type_level + order by type_level, attribute_id Index: openacs-4/packages/acs-subsite/tcl/party-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/party-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/tcl/party-procs-postgresql.xql 1 Sep 2001 14:54:42 -0000 1.4 +++ openacs-4/packages/acs-subsite/tcl/party-procs-postgresql.xql 9 Sep 2001 16:34:56 -0000 1.5 @@ -25,8 +25,8 @@ case when valid_types.object_type = null then 0 else 1 end as valid_p from (select t2.pretty_name, t2.object_type, - tree_level(t2.tree_sortkey) as tree_level, - repeat(' ', (tree_level(t2.tree_sortkey) - 1) * 4) as indent, + tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey) as tree_level, + repeat(' ', (tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey)) * 4) as indent, t2.tree_sortkey from acs_object_types t1, acs_object_types t2 Index: openacs-4/packages/acs-subsite/tcl/relation-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/relation-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/tcl/relation-procs-postgresql.xql 28 Aug 2001 19:03:28 -0000 1.4 +++ openacs-4/packages/acs-subsite/tcl/relation-procs-postgresql.xql 9 Sep 2001 16:34:56 -0000 1.5 @@ -52,13 +52,14 @@ case when valid_types.rel_type = null then 0 else 1 end as valid_p from (select - t.pretty_name, t.object_type, tree_level(t.tree_sortkey) as level, - lpad(' ', (tree_level(t.tree_sortkey) - 1) * 4) as indent, - t.tree_sortkey as sortkey + t2.pretty_name, t2.object_type, tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey) as level, + repeat(' ', (tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey)) * 4) as indent, + t2.tree_sortkey as sortkey from - acs_object_types t - where tree_sortkey like (select tree_sortkey || '%' - from acs_object_types where object_type = :start_with)) types left join + acs_object_types t1, + acs_object_types t2 + where t2.tree_sortkey like (t1.tree_sortkey || '%') + and t1.object_type = :start_with) types left join (select rel_type from Index: openacs-4/packages/acs-subsite/www/admin/rel-types/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-types/index-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/rel-types/index-postgresql.xql 11 Aug 2001 21:31:03 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/rel-types/index-postgresql.xql 9 Sep 2001 16:34:56 -0000 1.3 @@ -7,14 +7,12 @@ select t.object_type as rel_type, t.pretty_name, t.indent, coalesce(num.number_relationships,0) as number_relationships - from (select t.pretty_name, t.object_type, tree_sortkey as inner_sortkey, - lpad(' ', (tree_level(tree_sortkey) - 1) * 4) as indent - from acs_object_types t - where (t.tree_sortkey like (select tree_sortkey || '%' from acs_object_types - where object_type='membership_rel') - or t.tree_sortkey like (select tree_sortkey || '%' from acs_object_types - where object_type='composition_rel')) - order by lower(t.pretty_name)) t left join + from (select t2.pretty_name, t2.object_type, t2.tree_sortkey as inner_sortkey, + repeat(' ', (tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey)) * 4) as indent + from acs_object_types t1, + acs_object_types t2 + where t2.tree_sortkey like (t1.tree_sortkey || '%') + and t1.object_type in ('membership_rel', 'composition_rel')) t left join (select r.rel_type, count(*) as number_relationships from acs_objects o, acs_rel_types r, app_group_distinct_rel_map m