Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql,v diff -u -r1.23 -r1.24 --- openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql 12 Oct 2009 22:46:16 -0000 1.23 +++ openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql 30 Mar 2013 22:50:45 -0000 1.24 @@ -66,35 +66,36 @@ 'file_storage__get_title' -- name_method ); -create or replace function inline_0 () -returns integer as' -declare +CREATE OR REPLACE FUNCTION inline_0 () +RETURNS integer AS $$ +DECLARE template_id integer; -begin +BEGIN -- Create the (default) file_storage_object content type template template_id := content_template__new( - ''file-storage-default'', -- name - '' + 'file-storage-default', -- name + ' @title;noquote@ @context;noquote@ @item_id;noquote@ -@text;noquote@'', -- text +@text;noquote@', -- text true -- is_live ); -- Register the template for the file_storage_object content type perform content_type__register_template( - ''file_storage_object'', -- content_type + 'file_storage_object', -- content_type template_id, -- template_id - ''public'', -- use_context - ''t'' -- is_default + 'public', -- use_context + 't' -- is_default ); return null; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0();