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 -r1.6 -r1.7
--- openacs-4/packages/calendar/tcl/calendar-procs.xql 10 Jan 2004 18:59:50 -0000 1.6
+++ openacs-4/packages/calendar/tcl/calendar-procs.xql 13 Jun 2005 16:25:26 -0000 1.7
@@ -1,85 +1,142 @@
-
-
-
-
- update calendars
- set calendar_name = :calendar_name
- where calendar_id = :calendar_id
-
-
-
-
-
+
+
+
+
+ update calendars
+ set calendar_name = :calendar_name
+ where calendar_id = :calendar_id
+
+
+
+
- select calendar_id
- from calendars
- where owner_id = :party_id
- and private_p = 't'
+ select calendar_id
+ from calendars
+ where owner_id = :party_id
+ and private_p = 't'
-
-
-
+
+
+
- select calendar_id
- from calendars
- where owner_id = :party_id
- and private_p = 't'
- and calendar_id in ([join $calendar_id_list ", "])
+ select calendar_id
+ from calendars
+ where owner_id = :party_id
+ and private_p = 't'
+ and calendar_id in ([join $calendar_id_list ", "])
-
+
-
-
-select type, item_type_id from cal_item_types
-where calendar_id= :calendar_id
-
-
+
+
+ select type, item_type_id from cal_item_types
+ where calendar_id= :calendar_id
+
+
-
-
-insert into cal_item_types
-(item_type_id, calendar_id, type)
-values
-(:item_type_id, :calendar_id, :type)
-
-
+
+
+ insert into cal_item_types
+ (item_type_id, calendar_id, type)
+ values
+ (:item_type_id, :calendar_id, :type)
+
+
-
-
-update cal_items
-set item_type_id= NULL
-where item_type_id = :item_type_id
-and on_which_calendar= :calendar_id
-
-
+
+
+ update cal_items
+ set item_type_id= NULL
+ where item_type_id = :item_type_id
+ and on_which_calendar= :calendar_id
+
+
-
-
-delete from cal_item_types where item_type_id= :item_type_id
-and calendar_id= :calendar_id
-
-
+
+
+ delete from cal_item_types where item_type_id= :item_type_id
+ and calendar_id= :calendar_id
+
+
-
-
+
+
select calendar_name
from calendars
where calendar_id = :calendar_id;
-
-
+
+
+
+
+ select calendar_id,
+ calendar_name,
+ private_p,
+ owner_id,
+ package_id
+ from calendars
+ where calendar_id = :calendar_id
+
+
-
-
- select calendar_id,
- calendar_name,
- private_p,
- owner_id,
- package_id
- from calendars
- where calendar_id = :calendar_id
-
-
+
+
+ select calendar_name
+ from calendars
+ where owner_id = :user_id
+
+
-
+
+
+ select calendar_id,package_id
+ from calendars
+ where owner_id = :from_user_id
+
+
+
+
+
+ select count(*)
+ from calendars
+ where owner_id = :to_user_id
+ and package_id = :l_pkg_id
+
+
+
+
+
+ update calendars
+ set owner_id = :to_user_id
+ where owner_id = :from_user_id
+ and calendar_id = :l_cal_id
+
+
+
+
+
+ select calendar_id
+ from calendars
+ where package_id = :l_pkg_id
+ and owner_id = :to_user_id
+
+
+
+
+
+ update cal_items
+ set on_which_calendar = :to_cal_id
+ where on_which_calendar = :l_cal_id
+
+
+
+
+
+ delete
+ from calendars
+ where calendar_id = :l_cal_id
+
+
+
+
\ No newline at end of file