Index: openacs-4/packages/calendar/tcl/cal-item-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/cal-item-procs-oracle.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,141 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ acs_permission.grant_permission (
+ object_id => :cal_item_id,
+ grantee_id => :party_id,
+ privilege => 'cal_item_read'
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ acs_permission.grant_permission (
+ object_id => :cal_item_id,
+ grantee_id => :party_id,
+ privilege => :permission
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ acs_permission.revoke_permission (
+ object_id => :cal_item_id,
+ grantee_id => :party_id,
+ privilege => :permission
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ :1 := acs_activity.new (
+ name => :name,
+ description => :description,
+ creation_user => :creation_user,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ :1 := timespan.new(
+ start_date => to_date(:start_date,:date_format),
+ end_date => to_date(:end_date,:date_format)
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ :1 := cal_item.new(
+ on_which_calendar => :on_which_calendar,
+ activity_id => :activity_id,
+ timespan_id => :timespan_id,
+ creation_user => :creation_user,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ acs_permission.grant_permission (
+ object_id => :cal_item_id,
+ grantee_id => :grantee_id,
+ privilege => :privilege
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ time_interval.edit (
+ interval_id => :interval_id,
+ start_date => to_date(:start_date,:date_format),
+ end_date => to_date(:end_date,:date_format)
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ cal_item.delete (
+ cal_item_id => :cal_item_id
+ );
+ end;
+
+
+
+
+
+
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/cal-item-procs-postgresql.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,246 @@
+
+
+
+ postgresql7.1
+
+
+
+
+
+
+ select acs_permission__grant_permission (
+ :cal_item_id,
+ :party_id,
+ 'cal_item_read'
+ )
+
+
+
+
+
+
+
+
+
+
+ select acs_permission__grant_permission (
+ :cal_item_id,
+ :party_id,
+ :permission
+ )
+
+
+
+
+
+
+
+
+ :cal_item_id,
+ grantee_id => :party_id,
+ privilege => :permission
+ );
+ end;
+-->
+
+ select acs_permission__revokke_permission (
+ :cal_item_id,
+ :party_id,
+ :permission
+ )
+
+
+
+
+
+
+
+
+
+
+ select acs_activity__new (
+ null,
+ :name,
+ :description,
+ 'f',
+ 'acs_activity',
+ now(),
+ :creation_user,
+ :creation_ip,
+ null
+ )
+
+
+
+
+
+
+
+
+
+
+ select timespan__new (
+
+
+
+ :to_date(:start_date,:date_format),
+ :to_date(:end_date,:date_format)
+ )
+
+
+
+
+
+
+
+
+
+
+ select cal_item__new (
+ null,
+ :on_which_calendar,
+ null,
+ null,
+ :timespan_id,
+ :activity_id,
+ null,
+ 'cal_item',
+ null,
+ now(),
+ :creation_user,
+ :creation_ip
+ )
+
+
+
+
+
+
+
+
+
+
+ select acs_permission__grant_permission (
+ :cal_item_id,
+ :grantee_id,
+ :privilege
+ )
+
+
+
+
+
+
+
+
+
+
+ select time_interval__edit (
+ :interval_id,
+ to_date(:start_date,:date_format),
+ to_date(:end_date,:date_format)
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+ select cal_item__delete (
+ :cal_item_id
+ )
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/cal-item-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/cal-item-procs.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ select grantee_id,
+ privilege
+ from acs_permissions
+ where object_id = :on_which_calendar
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/calendar-community-core-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/Attic/calendar-community-core-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/calendar-community-core-procs-oracle.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ select acs_group.name(:group_id)
+ from dual
+
+
+
+
+
+
+
+
+ select acs_object_util.get_object_type(:party_id)
+ as result
+ from dual
+
+
+
+
+
+
+
+
+ select acs_object_util.get_object_type(:party_id)
+ as result
+ from dual
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/calendar-community-core-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/Attic/calendar-community-core-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/calendar-community-core-procs-postgresql.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select acs_group__name(:group_id)
+ from dual
+
+
+
+
+
+
+
+
+ select acs_object_util__get_object_type(:party_id)
+ as result
+ from dual
+
+
+
+
+
+
+
+
+ select acs_object_util__get_object_type(:party_id)
+ as result
+ from dual
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/calendar-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/calendar-procs-oracle.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,100 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+ begin
+ :1 := calendar.new(
+ owner_id => :owner_id,
+ private_p => :private_p,
+ calendar_name => :calendar_name,
+ package_id => :package_id,
+ creation_user => :creation_user,
+ creation_ip => :creation_ip
+ );
+ end;
+
+
+
+
+
+
+
+
+ select acs.magic_object_id('the_public')
+ as party_id
+ from dual
+
+
+
+
+
+
+
+
+ begin
+ acs_permission.grant_permission (
+ object_id => :calendar_id,
+ grantee_id => :party_id,
+ privilege => :cal_privilege
+ );
+ end;
+
+
+
+
+
+
+
+
+ begin
+ acs_permission.revoke_permission (
+ object_id => :calendar_id,
+ grantee_id => :party_id,
+ privilege => :cal_privilege
+ );
+ end;
+
+
+
+
+
+
+
+
+ select acs_object.name(:private_id)
+ from dual
+
+
+
+
+
+
+
+
+ select calendar.name(:calendar_id)
+ from dual
+
+
+
+
+
+
+
+
+ select acs_permission.permission_p(
+ :calendar_id,
+ acs.magic_object_id('the_public'),
+ 'calendar_read'
+ )
+ from dual
+
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/calendar-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/calendar-procs-postgresql.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,128 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select calendar__new(
+ null,
+ :calendar_name,
+ 'calendar',
+ :owner_id,
+ :private_p,
+ :package_id,
+ null,
+ now(),
+ :creation_user,
+ :creation_ip
+ );
+
+
+
+
+
+
+
+ select acs__magic_object_id('the_public')
+ as party_id
+ from dual
+
+
+
+
+
+
+
+
+ select ac_permission__grant_permission(
+ :calendar_id,
+ :party_id,
+ :cal_privilege
+ );
+
+
+
+
+
+
+
+ select acs_permission_revoke_permission (
+ :calendar_id,
+ :party_id,
+ :cal_privilege
+ );
+
+
+
+
+
+
+
+ select acs_object__name(:private_id)
+ from dual
+
+
+
+
+
+
+
+
+ select calendar__name(:calendar_id)
+ from dual
+
+
+
+
+
+
+
+
+ select acs_permission__permission_p(
+ :calendar_id,
+ acs__magic_object_id('the_public'),
+ 'calendar_read'
+ )
+ from dual
+
+
+
+
+
+
+
Index: openacs-4/packages/calendar/tcl/calendar-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/calendar/tcl/calendar-procs.xql 24 Aug 2001 01:19:03 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ update calendars
+ set calendar_name = :calendar_name
+ where calendar_id = :calendar_id
+
+
+
+
+
+