Index: openacs-4/packages/calendar/sql/oracle/cal-item-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/sql/oracle/cal-item-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/sql/oracle/cal-item-create.sql 12 Feb 2002 14:13:57 -0000 1.2 +++ openacs-4/packages/calendar/sql/oracle/cal-item-create.sql 8 Mar 2002 22:29:24 -0000 1.3 @@ -87,6 +87,8 @@ on_which_calendar in calendars.calendar_id%TYPE , name in acs_activities.name%TYPE default null, description in acs_activities.description%TYPE default null, + html_p in acs_activities.html_p%TYPE default 'f', + status_summary in acs_activities.status_summary%TYPE default null, timespan_id in acs_events.timespan_id%TYPE default null, activity_id in acs_events.activity_id%TYPE default null, recurrence_id in acs_events.recurrence_id%TYPE default null, @@ -125,6 +127,8 @@ on_which_calendar in calendars.calendar_id%TYPE , name in acs_activities.name%TYPE default null, description in acs_activities.description%TYPE default null, + html_p in acs_activities.html_p%TYPE default 'f', + status_summary in acs_activities.status_summary%TYPE default null, timespan_id in acs_events.timespan_id%TYPE default null, activity_id in acs_events.activity_id%TYPE default null, recurrence_id in acs_events.recurrence_id%TYPE default null, @@ -145,6 +149,8 @@ event_id => cal_item_id, name => name, description => description, + html_p => html_p, + status_summary => status_summary, timespan_id => timespan_id, activity_id => activity_id, recurrence_id => recurrence_id, Index: openacs-4/packages/calendar/sql/postgresql/cal-item-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/sql/postgresql/cal-item-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/calendar/sql/postgresql/cal-item-create.sql 12 Feb 2002 14:13:57 -0000 1.5 +++ openacs-4/packages/calendar/sql/postgresql/cal-item-create.sql 8 Mar 2002 22:29:24 -0000 1.6 @@ -33,21 +33,6 @@ DROP FUNCTION inline_0 (); ---begin - --- acs_object_type.create_type ( --- supertype => 'acs_event', --- object_type => 'cal_item', --- pretty_name => 'Calendar Item', --- pretty_plural => 'Calendar Items', --- table_name => 'cal_items', --- id_column => 'cal_item_id' --- ); - ---end; ---/ ---show errors - CREATE FUNCTION inline_1 () RETURNS integer AS ' begin @@ -74,21 +59,6 @@ DROP FUNCTION inline_1 (); ---declare --- attr_id acs_attributes.attribute_id%TYPE; ---begin --- attr_id := acs_attribute.create_attribute ( --- object_type => 'cal_item', --- attribute_name => 'on_which_caledar', --- pretty_name => 'On Which Calendar', --- pretty_plural => 'On Which Calendars', --- datatype => 'integer' --- ); ---end; ---/ ---show errors - - -- -- Each cal_item has the super_type of ACS_EVENTS -- -- Table cal_items supplies additional information @@ -132,6 +102,8 @@ integer, -- on_which_calendar calenders.calendar_id%TYPE varchar, -- name acs_activities.name%TYPE varchar, -- description acs_activities.description%TYPE + boolean, -- html_p acs_activities.html_p%TYPE + varchar, -- status_summary acs_activities.status_summary%TYPE integer, -- timespan_id acs_events.timespan_id%TYPE integer, -- activity_id acs_events.activity_id%TYPE integer, -- recurrence_id acs_events.recurrence_id%TYPE @@ -147,21 +119,25 @@ new__on_which_calendar alias for $2; -- default null new__name alias for $3; new__description alias for $4; - new__timespan_id alias for $5; -- default null - new__activity_id alias for $6; -- default null - new__recurrence_id alias for $7; -- default null - new__object_type alias for $8; -- default "cal_item" - new__context_id alias for $9; -- default null - new__creation_date alias for $10; -- default now() - new__creation_user alias for $11; -- default null - new__creation_ip alias for $12; -- default null + new__html_p alias for $5; -- default null + new__status_summary alias for $6; -- default null + new__timespan_id alias for $7; -- default null + new__activity_id alias for $8; -- default null + new__recurrence_id alias for $9; -- default null + new__object_type alias for $10; -- default "cal_item" + new__context_id alias for $11; -- default null + new__creation_date alias for $12; -- default now() + new__creation_user alias for $13; -- default null + new__creation_ip alias for $14; -- default null v_cal_item_id cal_items.cal_item_id%TYPE; begin v_cal_item_id := acs_event__new( new__cal_item_id, -- event_id new__name, -- name new__description, -- description + new__html_p, -- html_p + new__status_summary, -- status_summary new__timespan_id, -- timespan_id new__activity_id, -- activity_id new__recurrence_id, -- recurrence_id @@ -258,169 +234,3 @@ end;' LANGUAGE 'plpgsql'; - - ---create or replace package cal_item ---as --- function new ( --- cal_item_id in cal_items.cal_item_id%TYPE default null, --- on_which_calendar in calendars.calendar_id%TYPE , --- name in acs_activities.name%TYPE default null, --- description in acs_activities.description%TYPE default null, --- timespan_id in acs_events.timespan_id%TYPE default null, --- activity_id in acs_events.activity_id%TYPE default null, --- recurrence_id in acs_events.recurrence_id%TYPE default null, --- object_type in acs_objects.object_type%TYPE default 'cal_item', --- context_id in acs_objects.context_id%TYPE default null, --- creation_date in acs_objects.creation_date%TYPE default sysdate, --- creation_user in acs_objects.creation_user%TYPE default null, --- creation_ip in acs_objects.creation_ip%TYPE default null --- ) return cal_items.cal_item_id%TYPE; --- --- delete cal_item --- procedure delete ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ); --- --- -- functions to return the name of the cal_item --- function name ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ) return acs_activities.name%TYPE; --- --- -- functions to return the calendar that owns the cal_item --- function on_which_calendar ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ) return calendars.calendar_id%TYPE; --- ---end cal_item; ---/ ---show errors; --- --- ---create or replace package body cal_item ---as --- function new ( --- cal_item_id in cal_items.cal_item_id%TYPE default null, --- on_which_calendar in calendars.calendar_id%TYPE , --- name in acs_activities.name%TYPE default null, --- description in acs_activities.description%TYPE default null, --- timespan_id in acs_events.timespan_id%TYPE default null, --- activity_id in acs_events.activity_id%TYPE default null, --- recurrence_id in acs_events.recurrence_id%TYPE default null, --- object_type in acs_objects.object_type%TYPE default 'cal_item', --- context_id in acs_objects.context_id%TYPE default null, --- creation_date in acs_objects.creation_date%TYPE default sysdate, --- creation_user in acs_objects.creation_user%TYPE default null, --- creation_ip in acs_objects.creation_ip%TYPE default null --- --- ) return cal_items.cal_item_id%TYPE --- --- is --- v_cal_item_id cal_items.cal_item_id%TYPE; --- v_grantee_id acs_permissions.grantee_id%TYPE; --- v_privilege acs_permissions.privilege%TYPE; --- --- begin --- v_cal_item_id := acs_event.new ( --- event_id => cal_item_id, --- name => name, --- description => description, --- timespan_id => timespan_id, --- activity_id => activity_id, --- recurrence_id => recurrence_id, --- object_type => object_type, --- creation_date => creation_date, --- creation_user => creation_user, --- creation_ip => creation_ip, --- context_id => context_id --- ); --- --- insert into cal_items --- (cal_item_id, on_which_calendar) --- values (v_cal_item_id, on_which_calendar); --- --- -- assign the default permission to the cal_item --- -- by default, cal_item are going to inherit the --- -- calendar permission that it belongs too. --- --- -- first find out the permissions. --- --select grantee_id into v_grantee_id --- --from acs_permissions --- --where object_id = cal_item.new.on_which_calendar; --- --- --select privilege into v_privilege --- --from acs_permissions --- --where object_id = cal_item.new.on_which_calendar; --- --- -- now we grant the permissions --- --acs_permission.grant_permission ( --- -- object_id => v_cal_item_id, --- -- grantee_id => v_grantee_id, --- -- privilege => v_privilege --- --- --); --- --- return v_cal_item_id; --- --- end new; --- --- procedure delete ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ) --- is --- --- begin --- -- Erase the cal_item assoicated with the id --- delete from cal_items --- where cal_item_id = cal_item.delete.cal_item_id; --- --- -- Erase all the privileges --- delete from acs_permissions --- where object_id = cal_item.delete.cal_item_id; --- --- acs_event.delete(cal_item_id); --- end delete; --- --- -- functions to return the name of the cal_item --- function name ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ) --- return acs_activities.name%TYPE --- --- is --- v_name acs_activities.name%TYPE; --- begin --- select name --- into v_name --- from acs_activities --- where activity_id = --- ( --- select activity_id --- from acs_events --- where event_id = cal_item.name.cal_item_id --- ); --- --- return v_name; --- end name; --- --- --- -- functions to return the calendar that owns the cal_item --- function on_which_calendar ( --- cal_item_id in cal_items.cal_item_id%TYPE --- ) --- return calendars.calendar_id%TYPE --- --- is --- v_calendar_id calendars.calendar_id%TYPE; --- begin --- select on_which_calendar --- into v_calendar_id --- from cal_items --- where cal_item_id = cal_item.on_which_calendar.cal_item_id; --- --- return v_calendar_id; --- end on_which_calendar; --- ---end cal_item; ---/ ---show errors; Index: openacs-4/packages/calendar/sql/postgresql/cal-item-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/sql/postgresql/cal-item-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/sql/postgresql/cal-item-drop.sql 27 Sep 2001 04:12:20 -0000 1.3 +++ openacs-4/packages/calendar/sql/postgresql/cal-item-drop.sql 8 Mar 2002 22:29:24 -0000 1.4 @@ -18,6 +18,8 @@ integer, varchar, varchar, + boolean, + varchar, integer, integer, integer, Index: openacs-4/packages/calendar/tcl/cal-item-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/calendar/tcl/cal-item-procs-postgresql.xql 17 Sep 2001 06:46:09 -0000 1.5 +++ openacs-4/packages/calendar/tcl/cal-item-procs-postgresql.xql 8 Mar 2002 22:29:24 -0000 1.6 @@ -46,6 +46,7 @@ :name, :description, 'f', + null, 'acs_activity', now(), :creation_user, @@ -75,6 +76,8 @@ :on_which_calendar, null, null, + null, + null, :timespan_id, :activity_id, null,