Index: openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql	19 Dec 2001 17:05:07 -0000	1.6
+++ openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql	12 Feb 2002 00:02:13 -0000	1.7
@@ -413,8 +413,12 @@
 
 create function inline_1 () 
 returns integer as '
+declare
+  v_folder_id integer;
 begin
-perform content_folder__new (
+select folder_id into v_folder_id from cr_folders where folder_id = -400;
+if not found then 
+  perform content_folder__new (
     ''trash'',
     ''Trash'', 
     ''Deleted content items get put here'',
@@ -425,6 +429,7 @@
     null,
     null
   );
+end if;
 return 0;
 end;
 ' language 'plpgsql';
