Index: openacs-4/packages/cms/sql/postgresql/cms-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/sql/postgresql/cms-create.sql 21 May 2001 23:13:59 -0000 1.3 +++ openacs-4/packages/cms/sql/postgresql/cms-create.sql 22 May 2001 04:06:54 -0000 1.4 @@ -20,7 +20,7 @@ attr_id acs_attributes.attribute_id%TYPE; begin - select acs_object_type__create_type ( + PERFORM acs_object_type__create_type ( ''content_module'', ''Content Module'', ''Content Modules'', @@ -216,7 +216,7 @@ end;' language 'plpgsql'; -create function get_label (integer) returns varchar as ' +create function content_module__get_label (integer) returns varchar as ' declare p_module_id alias for $1; v_name cm_modules.name%TYPE; Index: openacs-4/packages/cms/sql/postgresql/cms-forms.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-forms.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/sql/postgresql/cms-forms.sql 20 May 2001 04:49:34 -0000 1.2 +++ openacs-4/packages/cms/sql/postgresql/cms-forms.sql 22 May 2001 04:03:04 -0000 1.3 @@ -231,7 +231,7 @@ if NOT FOUND then - raise EXCEPTION ''-20000: Attribute %: % does not exist in cm_form_widget.register_attribute_widget'', content_type, attribute_name; + raise EXCEPTION ''-20000: Attribute %: % does not exist in cm_form_widget.register_attribute_widget'', p_content_type, p_attribute_name; end if; -- Determine if a previous value exists @@ -263,7 +263,7 @@ insert into cm_attribute_widgets (attribute_id, widget, is_required) values - (v_attr_id, widget, is_required); + (v_attr_id, p_widget, p_is_required); end if; return 0; @@ -274,9 +274,9 @@ create function cm_form_widget__set_attribute_order (varchar,varchar,integer) returns integer as ' declare - p_content_type alias for $1; - p_attribute_name alias for $2; - p_sort_order alias for $3; + p_content_type alias for $1; + p_attribute_name alias for $2; + p_sort_order alias for $3; begin @@ -310,7 +310,7 @@ and object_type = p_content_type; if NOT FOUND then - raise EXCEPTION ''-20000: Attribute %: % does not exist in cm_form_widget.unregister_attribute_widget'', content_type, attribute_name; + raise EXCEPTION ''-20000: Attribute %: % does not exist in cm_form_widget.unregister_attribute_widget'', p_content_type, p_attribute_name; end if; -- Look for the widget; if no widget is registered, just return @@ -359,12 +359,12 @@ where a.attribute_name = p_attribute_name and - a.object_type=p_content_type + a.object_type = p_content_type and aw.attribute_id = a.attribute_id; if NOT FOUND then - raise EXCEPTION ''-20000: No widget is registered for attribute %''.% in cm_form_widget.set_attribute_param_value'', content_type, attribute_name; + raise EXCEPTION ''-20000: No widget is registered for attribute %''.% in cm_form_widget.set_attribute_param_value'', p_content_type, p_attribute_name; end; -- Get the param id @@ -373,7 +373,7 @@ and param = p_param; if NOT FOUND then - raise EXCEPTION ''-20000: No parameter named % exists for the widget % in cm_form_widget.set_attribute_param_value'',param, v_widget; + raise EXCEPTION ''-20000: No parameter named % exists for the widget % in cm_form_widget.set_attribute_param_value'', p_param, v_widget; end if; -- Check if an old value exists @@ -398,7 +398,7 @@ insert into cm_attribute_widget_params (attribute_id, param_id, param_type, param_source, value) values - (v_attr_id, v_param_id, param_type, param_source, value); + (v_attr_id, v_param_id, p_param_type, p_param_source, p_value); end if; return 0; Index: openacs-4/packages/cms/sql/postgresql/cms-permissions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-permissions.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/cms/sql/postgresql/cms-permissions.sql 21 May 2001 23:13:59 -0000 1.2 +++ openacs-4/packages/cms/sql/postgresql/cms-permissions.sql 22 May 2001 03:58:15 -0000 1.3 @@ -339,7 +339,7 @@ ) = ''f'' and h1.child_privilege = ''cm_perm'' and h1.tree_sortkey like (h2.tree_sortkey || ''%'') - and h2.tree_sortkey < h1.tree_sortkey + and h2.tree_sortkey <= h1.tree_sortkey limit 1; end;' language 'plpgsql'; @@ -515,7 +515,7 @@ -- Revoke the parent permission for v_idx in 1..v_count loop - acs_permission__revoke_permission ( + PERFORM acs_permission__revoke_permission ( v_items(v_idx), p_revokee_id, p_privilege @@ -528,7 +528,7 @@ -- function permission_p create function cms_permission__permission_p (integer,integer,varchar) -returns varchar as ' +returns boolean as ' declare p_item_id alias for $1; p_holder_id alias for $2; @@ -812,7 +812,7 @@ -- function has_revoke_authority create function content_permission__has_revoke_authority (integer,integer,varchar,integer) -returns varchar as ' +returns boolean as ' declare p_object_id alias for $1; p_holder_id alias for $2; @@ -859,7 +859,7 @@ -- function permission_p create function content_permission__permission_p (integer,integer,varchar) -returns varchar as ' +returns boolean as ' declare p_object_id alias for $1; p_holder_id alias for $2;