Index: openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql	8 Nov 2010 13:17:44 -0000	1.3
+++ openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql	1 Nov 2013 21:08:29 -0000	1.4
@@ -63,30 +63,37 @@
 --     and users.user_id = persons.person_id;
 
 
---Creating default site tempaltes 
+--Creating default site templates 
 
-create function inline_0()
-returns integer as '
-declare 
+
+
+--
+-- procedure inline_0/0
+--
+CREATE OR REPLACE FUNCTION inline_0(
+
+) RETURNS integer AS $$
+DECLARE 
 	v_site_template_id	dotlrn_site_templates.site_template_id%TYPE;
 	v_theme_id		portal_element_themes.theme_id%TYPE;
-begin
+BEGIN
         select theme_id into v_theme_id 
         from portal_element_themes 
-	where name = ''#new-portal.sloan_theme_name#''; 
+	where name = '#new-portal.sloan_theme_name#'; 
 
-	select nextval(''t_acs_object_id_seq'')
+	select nextval('t_acs_object_id_seq')
         into v_site_template_id 
         from dual;
 
 	insert into dotlrn_site_templates
 	(site_template_id, pretty_name, site_master, portal_theme_id ) 
 	values 
-	(v_site_template_id, ''#new-portal.sloan_theme_name#'',''/packages/dotlrn/www/dotlrn-master'', v_theme_id);
+	(v_site_template_id, '#new-portal.sloan_theme_name#','/packages/dotlrn/www/dotlrn-master', v_theme_id);
 	
 	return v_site_template_id;
 
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 select inline_0();
 
