Index: openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql	1 Sep 2001 20:34:19 -0000	1.6
+++ openacs-4/packages/acs-reference/sql/postgresql/acs-reference-create.sql	2 Sep 2001 17:06:29 -0000	1.7
@@ -170,19 +170,18 @@
 create function acs_reference__delete (integer)
 returns integer as '
 declare
-    repository_id alias for $1;
+    p_repository_id alias for $1;
+    v_maintainer_id		acs_objects.object_id%TYPE;
 begin
     select maintainer_id into v_maintainer_id
     from   acs_reference_repositories
-    where  repository_id = acs_reference__delete.repository_id;
+    where  repository_id = p_repository_id;
 
     delete from acs_reference_repositories
-    where repository_id = acs_reference__delete.repository_id;
+    where repository_id = p_repository_id;
 
-    acs_object__delete(repository_id);
-    -- Who added this it is ridiculous
-    -- a person could exist from something else
---  person__delete(v_maintainer_id);
+    perform acs_object__delete(p_repository_id);
+    return 0;
 end;
 ' language 'plpgsql';
 
