Index: openacs-4/packages/calendar/calendar.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/calendar.info,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/calendar/calendar.info	23 Sep 2001 15:13:26 -0000	1.4
+++ openacs-4/packages/calendar/calendar.info	15 Oct 2001 18:46:59 -0000	1.5
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- Generated by the ACS Package Manager -->
+<!-- Generated by the OpenACS Package Manager -->
 
 <package key="calendar" url="http://www.arsdigita.com/acs-repository/apm/packages/calendar" type="apm_application">
     <package-name>Calendar</package-name>
@@ -19,6 +19,7 @@
         <description format="text/html">straight port of calendar</description>
 
         <requires url="acs-datetime" version="4.0"/>
+        <requires url="ref-timezones" version="0.1d"/>
 
         <files>
             <file type="package_spec" path="calendar.info"/>
@@ -43,6 +44,7 @@
             <file type="query_file" db_type="oracle" path="tcl/calendar-community-core-procs-oracle.xql"/>
             <file type="query_file" db_type="postgresql" path="tcl/calendar-community-core-procs-postgresql.xql"/>
             <file type="tcl_procs" path="tcl/calendar-community-core-procs.tcl"/>
+            <file type="query_file" path="tcl/calendar-community-core-procs.xql"/>
             <file type="query_file" db_type="oracle" path="tcl/calendar-procs-oracle.xql"/>
             <file type="query_file" db_type="postgresql" path="tcl/calendar-procs-postgresql.xql"/>
             <file type="tcl_procs" path="tcl/calendar-procs.tcl"/>
@@ -87,7 +89,7 @@
             <file type="query_file" db_type="postgresql" path="www/cal-listview-postgresql.xql"/>
             <file type="content_page" path="www/cal-listview.adp"/>
             <file type="content_page" path="www/cal-listview.tcl"/>
-            <file type="query_file" path="www/cal-monthview-oralce.xql"/>
+            <file type="query_file" path="www/cal-monthview-oracle.xql"/>
             <file type="query_file" db_type="postgresql" path="www/cal-monthview-postgresql.xql"/>
             <file type="content_page" path="www/cal-monthview.adp"/>
             <file type="content_page" path="www/cal-monthview.tcl"/>
Index: openacs-4/packages/calendar/sql/postgresql/cal-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/sql/postgresql/cal-table-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/calendar/sql/postgresql/cal-table-create.sql	17 Sep 2001 13:38:09 -0000	1.4
+++ openacs-4/packages/calendar/sql/postgresql/cal-table-create.sql	15 Oct 2001 18:46:59 -0000	1.5
@@ -58,8 +58,8 @@
           -- which time zone does the user belong to
         time_zone               integer 
                                 constraint cal_pty_prefs_time_zone_fk
-                                --references timezones
-                                --on delete cascade
+                                references timezones
+                                on delete cascade
 				check (time_zone > 0),
           -- which day to start the week, monday or sunday
         first_day_of_week       varchar(9)
Index: openacs-4/packages/calendar/tcl/cal-item-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/cal-item-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/calendar/tcl/cal-item-procs.tcl	9 Sep 2001 07:18:46 -0000	1.2
+++ openacs-4/packages/calendar/tcl/cal-item-procs.tcl	15 Oct 2001 18:46:59 -0000	1.3
@@ -214,34 +214,12 @@
     set date_format "YYYY-MM-DD HH24:MI"
 
     # first update the acs_activities
-    set sql "
-    update acs_activities 
-    set    name = :name,
-           description = :description
-    where  activity_id
-    in     (
-           select activity_id
-           from   acs_events
-           where  event_id = :cal_item_id
-           )
-    "
     
-    db_dml update_activity $sql
+    db_dml update_activity ""
 
     # update the time interval based on the timespan id
 
-    # find out the interval_id so we can call time_interval.edit()
-    set sql "
-    select interval_id 
-    from   timespans
-    where  timespan_id
-    in     (
-           select timespan_id
-           from   acs_events
-           where  event_id = :cal_item_id
-           )
-    "
-    db_1row get_interval_id $sql
+    db_1row get_interval_id ""
 
     # call edit procedure
     db_exec_plsql update_interval "
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 -r1.1 -r1.2
--- openacs-4/packages/calendar/tcl/cal-item-procs.xql	24 Aug 2001 01:19:03 -0000	1.1
+++ openacs-4/packages/calendar/tcl/cal-item-procs.xql	15 Oct 2001 18:46:59 -0000	1.2
@@ -12,5 +12,31 @@
       </querytext>
 </fullquery>
 
+<fullquery name="ad_proc cal_item_update.update_activity">
+    <querytext>
+    update acs_activities 
+    set    name = :name,
+           description = :description
+    where  activity_id
+    in     (
+           select activity_id
+           from   acs_events
+           where  event_id = :cal_item_id
+           )
+    </querytext>
+</fullquery>
+
+<fullquery name="ad_proc cal_item_update.get_interval_id">
+    <querytext>
+    select interval_id 
+    from   timespans
+    where  timespan_id
+    in     (
+           select timespan_id
+           from   acs_events
+           where  event_id = :cal_item_id
+           )
+    </querytext>
+</fullquery>
  
 </queryset>
Index: openacs-4/packages/calendar/tcl/calendar-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/tcl/calendar-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/calendar/tcl/calendar-procs.tcl	17 Sep 2001 06:49:49 -0000	1.3
+++ openacs-4/packages/calendar/tcl/calendar-procs.tcl	15 Oct 2001 18:46:59 -0000	1.4
@@ -83,12 +83,7 @@
    
 } {
 
-    set sql "
-    select    calendar_id,
-    from      calendars
-    where     owner_id = :party_id
-    "
-    return [db_0or1row get_calendar_info $sql]
+    return [db_0or1row get_calendar_info ""]
     
 }
 
@@ -104,15 +99,7 @@
 
 } {
 
-
-    # query to figure out the existence of the private calendar
-    set sql "
-    select    calendar_id
-    from      calendars
-    where     owner_id = :party_id
-    and       private_p = 't'
-    "
-    set result [db_string get_calendar_info $sql -default 0]
+    set result [db_string get_calendar_info "" -default 0]
     
     if { ![string equal $result "0"] } {
 
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.1 -r1.2
--- openacs-4/packages/calendar/tcl/calendar-procs.xql	24 Aug 2001 01:19:03 -0000	1.1
+++ openacs-4/packages/calendar/tcl/calendar-procs.xql	15 Oct 2001 18:46:59 -0000	1.2
@@ -11,5 +11,21 @@
       </querytext>
 </fullquery>
 
+<fullquery name="calendar_have_group_cal_p.get_calendar_info">
+    <querytext>
+    select    calendar_id,
+    from      calendars
+    where     owner_id = :party_id
+    </querytext>
+</fullquery>
+
+<fullquery name="calendar_have_private_p.get_calendar_info">
+    <querytext>
+    select    calendar_id
+    from      calendars
+    where     owner_id = :party_id
+    and       private_p = 't'
+    </querytext>
+</fullquery>
  
 </queryset>