Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/postgresql/views-and-plsql.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/postgresql/views-and-plsql.sql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/postgresql/views-and-plsql.sql 28 May 2001 20:41:57 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/sql/postgresql/views-and-plsql.sql 29 May 2001 00:36:13 -0000 1.2 @@ -76,22 +76,22 @@ create function ttl_top_privilege_for_object (integer, integer) returns varchar as ' declare - object_id alias for $1; - user_id alias for $2; - v_privilege acs_privileges.privilege%TYPE; + p_object_id alias for $1; + p_user_id alias for $2; + v_privilege acs_privileges.privilege%TYPE default ''''; v_admin_p integer; begin select count(*) into v_admin_p from dual - where acs_permission__permission_p(object_id, user_id, ''admin'') = ''t''; + where acs_permission__permission_p(p_object_id, p_user_id, ''admin'') = ''t''; if v_admin_p = 1 then v_privilege := ''admin''; else select privilege into v_privilege from acs_permissions - where object_id = object_id - and grantee_id = user_id + where object_id = p_object_id + and grantee_id = p_user_id and privilege = ''write''; end if;