Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql 17 Mar 2001 16:00:40 -0000 1.7 +++ openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql 17 Mar 2001 16:14:54 -0000 1.8 @@ -161,9 +161,8 @@ -- now recurse down from this node - PERFORM priv_recurse_subtree(new_key, - v_rec.privilege, - v_rec.child_privilege); + PERFORM priv_recurse_subtree(new_key, v_rec.child_privilege); + end LOOP; return new; @@ -174,12 +173,11 @@ on acs_privilege_hierarchy for each row execute procedure acs_priv_hier_ins_del_tr (); -create function priv_recurse_subtree(varchar, varchar, varchar) +create function priv_recurse_subtree(varchar, varchar) returns integer as ' declare nkey alias for $1; - priv alias for $2; - child_priv alias for $3; + child_priv alias for $2; new_key varchar; v_rec record; begin @@ -211,9 +209,8 @@ -- keep recursing down until no more children are found - PERFORM priv_recurse_subtree(new_key, - v_rec.privilege, - v_rec.child_privilege); + PERFORM priv_recurse_subtree(new_key, v_rec.child_privilege); + end LOOP; -- no children found, so insert the child node as its own separate