Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql 9 Aug 2002 18:39:31 -0000 1.2 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-admin-portlet-create.sql 19 Aug 2014 16:50:40 -0000 1.2.22.1 @@ -33,61 +33,67 @@ -- ported to postgres by mohan pakkurti (mohan@pakkurti.com) -- 2002-07-12 -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN ds_id := portal_datasource__new( - ''forums_admin_portlet'', - ''Displays the forums_admin'' + 'forums_admin_portlet', + 'Displays the forums_admin' ); -- 4 defaults procs -- shadeable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''f'' + 't', + 't', + 'shadeable_p', + 'f' ); -- shaded_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); -- hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); -- user_editable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); -- link_hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); @@ -96,118 +102,140 @@ -- package_id must be configured perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''f'', - ''package_id'', - '''' + 't', + 'f', + 'package_id', + '' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- create the implementation foo := acs_sc_impl__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''forums_admin_portlet'' + 'portal_datasource', + 'forums_admin_portlet', + 'forums_admin_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- add all the hooks foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''GetMyName'', - ''forums_admin_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'GetMyName', + 'forums_admin_portlet::get_my_name', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''GetPrettyName'', - ''forums_admin_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'GetPrettyName', + 'forums_admin_portlet::get_pretty_name', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''Link'', - ''forums_admin_portlet::link'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'Link', + 'forums_admin_portlet::link', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''AddSelfToPage'', - ''forums_admin_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'AddSelfToPage', + 'forums_admin_portlet::add_self_to_page', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''Show'', - ''forums_admin_portlet::show'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'Show', + 'forums_admin_portlet::show', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''Edit'', - ''forums_admin_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'Edit', + 'forums_admin_portlet::edit', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_admin_portlet'', - ''RemoveSelfFromPage'', - ''forums_admin_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'forums_admin_portlet', + 'RemoveSelfFromPage', + 'forums_admin_portlet::remove_self_from_page', + 'TCL' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- Add the binding perform acs_sc_binding__new ( - ''portal_datasource'', - ''forums_admin_portlet'' + 'portal_datasource', + 'forums_admin_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql 9 Aug 2002 18:39:31 -0000 1.2 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-create.sql 19 Aug 2014 16:50:40 -0000 1.2.22.1 @@ -35,61 +35,67 @@ -- \i forums-portlet-sc-create.sql -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN ds_id := portal_datasource__new ( - ''forums_portlet'', - ''Displays the forums'' + 'forums_portlet', + 'Displays the forums' ); -- 4 defaults procs -- shadeable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''t'' + 't', + 't', + 'shadeable_p', + 't' ); -- shaded_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); -- hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); -- user_editable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); -- link_hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); @@ -98,128 +104,150 @@ -- package_id must be configured perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''f'', - ''package_id'', - '''' + 't', + 'f', + 'package_id', + '' ); -- do we show the community name or not? perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''f'', - ''display_group_name_p'', - ''t'' + 't', + 'f', + 'display_group_name_p', + 't' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- create the implementation foo := acs_sc_impl__new ( - ''portal_datasource'', - ''forums_portlet'', - ''forums_portlet'' + 'portal_datasource', + 'forums_portlet', + 'forums_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- add all the hooks foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''GetMyName'', - ''forums_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'GetMyName', + 'forums_portlet::get_my_name', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''GetPrettyName'', - ''forums_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'GetPrettyName', + 'forums_portlet::get_pretty_name', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''Link'', - ''forums_portlet::link'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'Link', + 'forums_portlet::link', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''AddSelfToPage'', - ''forums_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'AddSelfToPage', + 'forums_portlet::add_self_to_page', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''Show'', - ''forums_portlet::show'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'Show', + 'forums_portlet::show', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''Edit'', - ''forums_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'Edit', + 'forums_portlet::edit', + 'TCL' ); foo := acs_sc_impl_alias__new ( - ''portal_datasource'', - ''forums_portlet'', - ''RemoveSelfFromPage'', - ''forums_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'forums_portlet', + 'RemoveSelfFromPage', + 'forums_portlet::remove_self_from_page', + 'TCL' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- Add the binding perform acs_sc_binding__new ( - ''portal_datasource'', - ''forums_portlet'' + 'portal_datasource', + 'forums_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql 9 Aug 2002 18:39:31 -0000 1.2 +++ openacs-4/packages/forums-portlet/sql/postgresql/forums-portlet-drop.sql 19 Aug 2014 16:50:40 -0000 1.2.22.1 @@ -33,16 +33,22 @@ -- 2002-07-12 -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN -- begin select datasource_id into ds_id from portal_datasources - where name = ''forums-portlet''; + where name = 'forums-portlet'; -- exception when no_data_found then -- ds_id := null; -- end; @@ -53,76 +59,84 @@ return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_1() -returns integer as ' -declare + + +-- +-- procedure inline_1/0 +-- +CREATE OR REPLACE FUNCTION inline_1( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- add all the hooks foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''GetMyName'' + 'portal_datasource', + 'forums_portlet', + 'GetMyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''GetPrettyName'' + 'portal_datasource', + 'forums_portlet', + 'GetPrettyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''Link'' + 'portal_datasource', + 'forums_portlet', + 'Link' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''AddSelfToPage'' + 'portal_datasource', + 'forums_portlet', + 'AddSelfToPage' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''Show'' + 'portal_datasource', + 'forums_portlet', + 'Show' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''Edit'' + 'portal_datasource', + 'forums_portlet', + 'Edit' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''forums_portlet'', - ''RemoveSelfFromPage'' + 'portal_datasource', + 'forums_portlet', + 'RemoveSelfFromPage' ); -- Drop the binding perform acs_sc_binding__delete ( - ''portal_datasource'', - ''forums_portlet'' + 'portal_datasource', + 'forums_portlet' ); -- drop the impl foo := acs_sc_impl__delete ( - ''portal_datasource'', - ''forums_portlet'' + 'portal_datasource', + 'forums_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_1(); drop function inline_1(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-create.sql,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-create.sql 24 Jul 2004 08:34:22 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-create.sql 19 Aug 2014 16:54:17 -0000 1.2.12.1 @@ -21,155 +21,162 @@ -- @version $Id$ -- -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; foo integer; - begin + BEGIN ds_id := portal_datasource__new( - ''fs_admin_portlet'', - ''Displays the given folder_id'' + 'fs_admin_portlet', + 'Displays the given folder_id' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''t'' + 't', + 't', + 'shadeable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''scoped_p'', - ''t'' + 't', + 'f', + 'scoped_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''folder_id'', - '''' + 't', + 'f', + 'folder_id', + '' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''contents_url'', - '''' + 't', + 'f', + 'contents_url', + '' ); -- create the implementation foo := acs_sc_impl__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''fs_admin_portlet'' + 'portal_datasource', + 'fs_admin_portlet', + 'fs_admin_portlet' ); -- add all the hooks foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''GetMyName'', - ''fs_admin_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'GetMyName', + 'fs_admin_portlet::get_my_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''GetPrettyName'', - ''fs_admin_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'GetPrettyName', + 'fs_admin_portlet::get_pretty_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Link'', - ''fs_admin_portlet::link'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'Link', + 'fs_admin_portlet::link', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''AddSelfToPage'', - ''fs_admin_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'AddSelfToPage', + 'fs_admin_portlet::add_self_to_page', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Show'', - ''fs_admin_portlet::show'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'Show', + 'fs_admin_portlet::show', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Edit'', - ''fs_admin_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'Edit', + 'fs_admin_portlet::edit', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_admin_portlet'', - ''RemoveSelfFromPage'', - ''fs_admin_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'fs_admin_portlet', + 'RemoveSelfFromPage', + 'fs_admin_portlet::remove_self_from_page', + 'TCL' ); -- Add the binding perform acs_sc_binding__new( - ''portal_datasource'', - ''fs_admin_portlet'' + 'portal_datasource', + 'fs_admin_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-drop.sql,v diff -u -r1.2 -r1.2.12.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-drop.sql 24 Jul 2004 08:34:22 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-admin-portlet-drop.sql 19 Aug 2014 16:54:18 -0000 1.2.12.1 @@ -9,16 +9,22 @@ -- License version 2 or higher. Full text of the license is available -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN -- begin select datasource_id into ds_id from portal_datasources - where name = ''fs-admin-portlet''; + where name = 'fs-admin-portlet'; -- exception when no_data_found then -- ds_id := null; -- end; @@ -28,76 +34,84 @@ end if; return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- drop the hooks foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''GetMyName'' + 'portal_datasource', + 'fs_admin_portlet', + 'GetMyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''GetPrettyName'' + 'portal_datasource', + 'fs_admin_portlet', + 'GetPrettyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Link'' + 'portal_datasource', + 'fs_admin_portlet', + 'Link' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''AddSelfToPage'' + 'portal_datasource', + 'fs_admin_portlet', + 'AddSelfToPage' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Show'' + 'portal_datasource', + 'fs_admin_portlet', + 'Show' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''Edit'' + 'portal_datasource', + 'fs_admin_portlet', + 'Edit' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs_admin_portlet'', - ''RemoveSelfFromPage'' + 'portal_datasource', + 'fs_admin_portlet', + 'RemoveSelfFromPage' ); -- Drop the binding perform acs_sc_binding__delete ( - ''portal_datasource'', - ''fs_admin_portlet'' + 'portal_datasource', + 'fs_admin_portlet' ); -- drop the impl foo := acs_sc_impl__delete ( - ''portal_datasource'', - ''fs_admin_portlet'' + 'portal_datasource', + 'fs_admin_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-create.sql 19 Aug 2014 16:54:18 -0000 1.2.22.1 @@ -20,139 +20,146 @@ -- @version $Id$ -- -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; foo integer; -begin +BEGIN ds_id := portal_datasource__new( - ''fs_contents_portlet'', - ''Displays one fs folder in a table'' + 'fs_contents_portlet', + 'Displays one fs folder in a table' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''t'' + 't', + 't', + 'shadeable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''folder_id'', - '''' + 't', + 'f', + 'folder_id', + '' ); -- create the implementation foo := acs_sc_impl__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''fs_contents_portlet'' + 'portal_datasource', + 'fs_contents_portlet', + 'fs_contents_portlet' ); -- add all the hooks foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''GetMyName'', - ''fs_contents_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'GetMyName', + 'fs_contents_portlet::get_my_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''GetPrettyName'', - ''fs_contents_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'GetPrettyName', + 'fs_contents_portlet::get_pretty_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''Link'', - ''fs_contents_portlet::link'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'Link', + 'fs_contents_portlet::link', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''AddSelfToPage'', - ''fs_contents_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'AddSelfToPage', + 'fs_contents_portlet::add_self_to_page', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''Show'', - ''fs_contents_portlet::show'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'Show', + 'fs_contents_portlet::show', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''Edit'', - ''fs_contents_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'Edit', + 'fs_contents_portlet::edit', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_contents_portlet'', - ''RemoveSelfFromPage'', - ''fs_contents_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'fs_contents_portlet', + 'RemoveSelfFromPage', + 'fs_contents_portlet::remove_self_from_page', + 'TCL' ); -- Add the binding perform acs_sc_binding__new( - ''portal_datasource'', - ''fs_contents_portlet'' + 'portal_datasource', + 'fs_contents_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql,v diff -u -r1.3 -r1.3.12.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql 24 Jul 2004 08:34:22 -0000 1.3 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-create.sql 19 Aug 2014 16:54:18 -0000 1.3.12.1 @@ -27,155 +27,162 @@ \i fs-contents-portlet-create.sql \i fs-admin-portlet-create.sql -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; foo integer; - begin + BEGIN ds_id := portal_datasource__new( - ''fs_portlet'', - ''Displays the given folder_id'' + 'fs_portlet', + 'Displays the given folder_id' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''t'' + 't', + 't', + 'shadeable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''scoped_p'', - ''t'' + 't', + 'f', + 'scoped_p', + 't' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''folder_id'', - '''' + 't', + 'f', + 'folder_id', + '' ); perform portal_datasource__set_def_param( ds_id, - ''t'', - ''f'', - ''contents_url'', - '''' + 't', + 'f', + 'contents_url', + '' ); -- create the implementation foo := acs_sc_impl__new( - ''portal_datasource'', - ''fs_portlet'', - ''fs_portlet'' + 'portal_datasource', + 'fs_portlet', + 'fs_portlet' ); -- add all the hooks foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''GetMyName'', - ''fs_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'GetMyName', + 'fs_portlet::get_my_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''GetPrettyName'', - ''fs_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'GetPrettyName', + 'fs_portlet::get_pretty_name', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''Link'', - ''fs_portlet::link'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'Link', + 'fs_portlet::link', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''AddSelfToPage'', - ''fs_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'AddSelfToPage', + 'fs_portlet::add_self_to_page', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''Show'', - ''fs_portlet::show'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'Show', + 'fs_portlet::show', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''Edit'', - ''fs_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'Edit', + 'fs_portlet::edit', + 'TCL' ); foo := acs_sc_impl_alias__new( - ''portal_datasource'', - ''fs_portlet'', - ''RemoveSelfFromPage'', - ''fs_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'fs_portlet', + 'RemoveSelfFromPage', + 'fs_portlet::remove_self_from_page', + 'TCL' ); -- Add the binding perform acs_sc_binding__new( - ''portal_datasource'', - ''fs_portlet'' + 'portal_datasource', + 'fs_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-portlet-drop.sql 19 Aug 2014 16:54:18 -0000 1.2.22.1 @@ -29,16 +29,22 @@ -- License version 2 or higher. Full text of the license is available -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN -- begin select datasource_id into ds_id from portal_datasources - where name = ''fs-portlet''; + where name = 'fs-portlet'; -- exception when no_data_found then -- ds_id := null; -- end; @@ -48,76 +54,84 @@ end if; return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE foo integer; -begin +BEGIN -- drop the hooks foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''GetMyName'' + 'portal_datasource', + 'fs-portlet', + 'GetMyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''GetPrettyName'' + 'portal_datasource', + 'fs-portlet', + 'GetPrettyName' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''Link'' + 'portal_datasource', + 'fs-portlet', + 'Link' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''AddSelfToPage'' + 'portal_datasource', + 'fs-portlet', + 'AddSelfToPage' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''Show'' + 'portal_datasource', + 'fs-portlet', + 'Show' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''Edit'' + 'portal_datasource', + 'fs-portlet', + 'Edit' ); foo := acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''fs-portlet'', - ''RemoveSelfFromPage'' + 'portal_datasource', + 'fs-portlet', + 'RemoveSelfFromPage' ); -- Drop the binding perform acs_sc_binding__delete ( - ''portal_datasource'', - ''fs-portlet'' + 'portal_datasource', + 'fs-portlet' ); -- drop the impl foo := acs_sc_impl__delete ( - ''portal_datasource'', - ''fs-portlet'' + 'portal_datasource', + 'fs-portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); Index: openacs-4/packages/fs-portlet/sql/postgresql/upgrade/upgrade-2.0.3-2.0.4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/upgrade/upgrade-2.0.3-2.0.4.sql,v diff -u -r1.4 -r1.4.12.1 --- openacs-4/packages/fs-portlet/sql/postgresql/upgrade/upgrade-2.0.3-2.0.4.sql 13 Jan 2005 13:58:20 -0000 1.4 +++ openacs-4/packages/fs-portlet/sql/postgresql/upgrade/upgrade-2.0.3-2.0.4.sql 19 Aug 2014 16:54:18 -0000 1.4.12.1 @@ -5,19 +5,26 @@ -- fs_contents_portlets get renamed properly. -- -create or replace function fold_rename() returns trigger as ' -declare + + +-- +-- procedure fold_rename/0 +-- +CREATE OR REPLACE FUNCTION fold_rename( + +) RETURNS trigger AS $$ +DECLARE row_res record; -begin +BEGIN if old.label <> new.label then for row_res in select m.element_id from portal_element_map m, portal_element_parameters p - where p.key = ''folder_id'' + where p.key = 'folder_id' and p.value = new.folder_id and m.element_id = p.element_id - and m.name = ''fs_contents_portlet'' loop + and m.name = 'fs_contents_portlet' loop update portal_element_map set pretty_name = new.label @@ -26,7 +33,8 @@ end loop; end if; return new; -end; ' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; create trigger fs_cont_port_fldr_rnme_tr after update on cr_folders for each row Index: openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-create.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-create.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-create.sql 19 Aug 2014 16:58:48 -0000 1.2.22.1 @@ -35,158 +35,165 @@ -- -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN - ds_id = portal_datasource__new( ''news_admin_portlet'', ''News Admin portlet''); + ds_id = portal_datasource__new( 'news_admin_portlet', 'News Admin portlet'); -- the standard 4 params -- shadeable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shadeable_p'', - ''f'' + 't', + 't', + 'shadeable_p', + 'f' ); -- hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''f'' + 't', + 't', + 'hideable_p', + 'f' ); -- user_editable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); -- shaded_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); -- link_hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); -- news_admin-specific params -- package_id must be configured perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''f'', - ''package_id'', - '''' + 't', + 'f', + 'package_id', + '' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_1() -returns integer as ' -begin +CREATE OR REPLACE FUNCTION inline_1() RETURNS integer AS $$ +BEGIN -- create the implementation perform acs_sc_impl__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''news_admin_portlet'' + 'portal_datasource', + 'news_admin_portlet', + 'news_admin_portlet' ); -- add all the hooks perform acs_sc_impl_alias__new( - ''portal_datasource'', - ''news_admin_portlet'', - ''GetMyName'', - ''news_admin_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'GetMyName', + 'news_admin_portlet::get_my_name', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''GetPrettyName'', - ''news_admin_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'GetPrettyName', + 'news_admin_portlet::get_pretty_name', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''Link'', - ''news_admin_portlet::link'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'Link', + 'news_admin_portlet::link', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''AddSelfToPage'', - ''news_admin_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'AddSelfToPage', + 'news_admin_portlet::add_self_to_page', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''Show'', - ''news_admin_portlet::show'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'Show', + 'news_admin_portlet::show', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''Edit'', - ''news_admin_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'Edit', + 'news_admin_portlet::edit', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_admin_portlet'', - ''RemoveSelfFromPage'', - ''news_admin_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'news_admin_portlet', + 'RemoveSelfFromPage', + 'news_admin_portlet::remove_self_from_page', + 'TCL' ); -- Add the binding perform acs_sc_binding__new ( - ''portal_datasource'', - ''news_admin_portlet'' + 'portal_datasource', + 'news_admin_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_1(); drop function inline_1(); Index: openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-drop.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-drop.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/news-portlet/sql/postgresql/news-admin-portlet-drop.sql 19 Aug 2014 16:58:48 -0000 1.2.22.1 @@ -35,18 +35,24 @@ -- -- 10 July 2002 -create function inline_0 () -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN select datasource_id into ds_id from portal_datasources - where name = ''news_admin_portlet''; + where name = 'news_admin_portlet'; if not found then - raise exception ''No datasource_id found here '',ds_id ; + raise exception 'No datasource_id found here ',ds_id ; ds_id := null; end if; @@ -57,7 +63,8 @@ return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0 (); Index: openacs-4/packages/news-portlet/sql/postgresql/news-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/sql/postgresql/news-portlet-create.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/news-portlet/sql/postgresql/news-portlet-create.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/news-portlet/sql/postgresql/news-portlet-create.sql 19 Aug 2014 16:58:48 -0000 1.2.22.1 @@ -30,161 +30,168 @@ -- License version 2 or higher. Full text of the license is available -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN ds_id = portal_datasource__new( - ''news_portlet'', -- Name - ''News portlet'' -- description + 'news_portlet', -- Name + 'News portlet' -- description ); -- the standard 4 params -- shadeable_p perform portal_datasource__set_def_param ( ds_id, -- datasource_id - ''t'', -- config_required_p - ''t'', -- configured_p - ''shadeable_p'', -- key - ''t'' -- value + 't', -- config_required_p + 't', -- configured_p + 'shadeable_p', -- key + 't' -- value ); -- hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''hideable_p'', - ''t'' + 't', + 't', + 'hideable_p', + 't' ); -- user_editable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''user_editable_p'', - ''f'' + 't', + 't', + 'user_editable_p', + 'f' ); -- shaded_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''shaded_p'', - ''f'' + 't', + 't', + 'shaded_p', + 'f' ); -- link_hideable_p perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''t'', - ''link_hideable_p'', - ''t'' + 't', + 't', + 'link_hideable_p', + 't' ); -- news-specific params -- community_id must be configured perform portal_datasource__set_def_param ( ds_id, - ''t'', - ''f'', - ''package_id'', - '''' + 't', + 'f', + 'package_id', + '' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0(); -create function inline_1() -returns integer as ' -begin +CREATE OR REPLACE FUNCTION inline_1() RETURNS integer AS $$ +BEGIN -- create the implementation perform acs_sc_impl__new ( - ''portal_datasource'', - ''news_portlet'', - ''news_portlet'' + 'portal_datasource', + 'news_portlet', + 'news_portlet' ); -- add all the hooks perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''GetMyName'', - ''news_portlet::get_my_name'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'GetMyName', + 'news_portlet::get_my_name', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''GetPrettyName'', - ''news_portlet::get_pretty_name'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'GetPrettyName', + 'news_portlet::get_pretty_name', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''Link'', - ''news_portlet::link'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'Link', + 'news_portlet::link', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''AddSelfToPage'', - ''news_portlet::add_self_to_page'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'AddSelfToPage', + 'news_portlet::add_self_to_page', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''Show'', - ''news_portlet::show'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'Show', + 'news_portlet::show', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''Edit'', - ''news_portlet::edit'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'Edit', + 'news_portlet::edit', + 'TCL' ); perform acs_sc_impl_alias__new ( - ''portal_datasource'', - ''news_portlet'', - ''RemoveSelfFromPage'', - ''news_portlet::remove_self_from_page'', - ''TCL'' + 'portal_datasource', + 'news_portlet', + 'RemoveSelfFromPage', + 'news_portlet::remove_self_from_page', + 'TCL' ); -- Add the binding perform acs_sc_binding__new ( - ''portal_datasource'', - ''news_portlet'' + 'portal_datasource', + 'news_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_1(); Index: openacs-4/packages/news-portlet/sql/postgresql/news-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/sql/postgresql/news-portlet-drop.sql,v diff -u -r1.2 -r1.2.22.1 --- openacs-4/packages/news-portlet/sql/postgresql/news-portlet-drop.sql 9 Aug 2002 18:39:32 -0000 1.2 +++ openacs-4/packages/news-portlet/sql/postgresql/news-portlet-drop.sql 19 Aug 2014 16:58:48 -0000 1.2.22.1 @@ -33,18 +33,24 @@ -- -create function inline_1() -returns integer as ' -declare + + +-- +-- procedure inline_1/0 +-- +CREATE OR REPLACE FUNCTION inline_1( + +) RETURNS integer AS $$ +DECLARE ds_id portal_datasources.datasource_id%TYPE; -begin +BEGIN select datasource_id into ds_id from portal_datasources - where name = ''news_portlet''; + where name = 'news_portlet'; if not found then - RAISE EXCEPTION '' No datasource id found '', ds_id; + RAISE EXCEPTION ' No datasource id found ', ds_id; ds_id := null; end if; @@ -54,62 +60,63 @@ -- drop the hooks perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''GetMyName'' + 'portal_datasource', + 'news_portlet', + 'GetMyName' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''GetPrettyName'' + 'portal_datasource', + 'news_portlet', + 'GetPrettyName' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''Link'' + 'portal_datasource', + 'news_portlet', + 'Link' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''AddSelfToPage'' + 'portal_datasource', + 'news_portlet', + 'AddSelfToPage' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''Show'' + 'portal_datasource', + 'news_portlet', + 'Show' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''Edit'' + 'portal_datasource', + 'news_portlet', + 'Edit' ); perform acs_sc_impl_alias__delete ( - ''portal_datasource'', - ''news_portlet'', - ''RemoveSelfFromPage'' + 'portal_datasource', + 'news_portlet', + 'RemoveSelfFromPage' ); -- Drop the binding perform acs_sc_binding__delete ( - ''portal_datasource'', - ''news_portlet'' + 'portal_datasource', + 'news_portlet' ); -- drop the impl perform acs_sc_impl__delete ( - ''portal_datasource'', - ''news_portlet'' + 'portal_datasource', + 'news_portlet' ); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_1(); drop function inline_1();