Index: openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql	8 Aug 2006 21:26:22 -0000	1.4
+++ openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql	1 Nov 2013 21:08:29 -0000	1.5
@@ -24,47 +24,47 @@
 -- @version $Id$
 --
 
-create function inline0()
-returns integer as '
-begin
+CREATE OR REPLACE FUNCTION inline0() RETURNS integer AS $$
+BEGIN
 
-    perform acs_privilege__remove_child(''admin'', ''dotlrn_admin_community'');
-    perform acs_privilege__remove_child(''admin'', ''dotlrn_admin_community_type'');
-    perform acs_privilege__remove_child(''admin'', ''dotlrn_browse'');
-    perform acs_privilege__remove_child(''create'', ''dotlrn_create_community'');
-    perform acs_privilege__remove_child(''create'', ''dotlrn_create_community_type'');
-    perform acs_privilege__remove_child(''read'', ''dotlrn_view_community'');
-    perform acs_privilege__remove_child(''read'', ''dotlrn_view_community_type'');
-    perform acs_privilege__remove_child(''write'', ''dotlrn_edit_community'');
+    perform acs_privilege__remove_child('admin', 'dotlrn_admin_community');
+    perform acs_privilege__remove_child('admin', 'dotlrn_admin_community_type');
+    perform acs_privilege__remove_child('admin', 'dotlrn_browse');
+    perform acs_privilege__remove_child('create', 'dotlrn_create_community');
+    perform acs_privilege__remove_child('create', 'dotlrn_create_community_type');
+    perform acs_privilege__remove_child('read', 'dotlrn_view_community');
+    perform acs_privilege__remove_child('read', 'dotlrn_view_community_type');
+    perform acs_privilege__remove_child('write', 'dotlrn_edit_community');
 
-    perform acs_privilege__remove_child(''dotlrn_edit_community'', ''dotlrn_view_community'');
-    perform acs_privilege__remove_child(''dotlrn_admin_community'', ''dotlrn_edit_community'');
-    perform acs_privilege__remove_child(''dotlrn_admin_community'', ''dotlrn_spam_community'');
+    perform acs_privilege__remove_child('dotlrn_edit_community', 'dotlrn_view_community');
+    perform acs_privilege__remove_child('dotlrn_admin_community', 'dotlrn_edit_community');
+    perform acs_privilege__remove_child('dotlrn_admin_community', 'dotlrn_spam_community');
 
 
     delete
     from acs_permissions
-    where privilege in (''dotlrn_admin_community'',
-                        ''dotlrn_admin_community_type'',
-                        ''dotlrn_browse'',
-                        ''dotlrn_create_community'',
-                        ''dotlrn_create_community_type'',
-                        ''dotlrn_edit_community'',
-                        ''dotlrn_view_community'',
-                        ''dotlrn_view_community_type'');
+    where privilege in ('dotlrn_admin_community',
+                        'dotlrn_admin_community_type',
+                        'dotlrn_browse',
+                        'dotlrn_create_community',
+                        'dotlrn_create_community_type',
+                        'dotlrn_edit_community',
+                        'dotlrn_view_community',
+                        'dotlrn_view_community_type');
 
-    perform acs_privilege__drop_privilege(''dotlrn_admin_community'');
-    perform acs_privilege__drop_privilege(''dotlrn_admin_community_type'');
-    perform acs_privilege__drop_privilege(''dotlrn_browse'');
-    perform acs_privilege__drop_privilege(''dotlrn_create_community'');
-    perform acs_privilege__drop_privilege(''dotlrn_create_community_type'');
-    perform acs_privilege__drop_privilege(''dotlrn_edit_community'');
-    perform acs_privilege__drop_privilege(''dotlrn_view_community'');
-    perform acs_privilege__drop_privilege(''dotlrn_view_community_type'');
-    perform acs_privilege__drop_privilege(''dotlrn_spam_community'');
+    perform acs_privilege__drop_privilege('dotlrn_admin_community');
+    perform acs_privilege__drop_privilege('dotlrn_admin_community_type');
+    perform acs_privilege__drop_privilege('dotlrn_browse');
+    perform acs_privilege__drop_privilege('dotlrn_create_community');
+    perform acs_privilege__drop_privilege('dotlrn_create_community_type');
+    perform acs_privilege__drop_privilege('dotlrn_edit_community');
+    perform acs_privilege__drop_privilege('dotlrn_view_community');
+    perform acs_privilege__drop_privilege('dotlrn_view_community_type');
+    perform acs_privilege__drop_privilege('dotlrn_spam_community');
     return 0;
 
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 select inline0();
 drop function inline0();
