Index: openacs-4/packages/calendar/www/view-list-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-list-display-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-list-display-postgresql.xql 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-list-display-postgresql.xql 26 Jul 2003 21:22:27 -0000 1.3 @@ -17,21 +17,24 @@ e.event_id as item_id, (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, to_char(start_date, 'Day') as pretty_weekday, - on_which_calendar as calendar_id, - (select calendar_name from calendars - where calendar_id = on_which_calendar) as calendar_name + cals.calendar_id, + cals.calendar_name from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id and cal_items.cal_item_id= e.event_id and (start_date >= to_date(:start_date,:date_format) or :start_date is null) and (start_date <= to_date(:end_date,:date_format) or :end_date is null) -$calendar_where_clause +and cals.package_id= :package_id +and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) +and cals.calendar_id = ci.on_which_calendar +and e.event_id = ci.cal_item_id order by $sort_by Index: openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-one-day-display-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 22 Jul 2003 14:39:29 -0000 1.3 +++ openacs-4/packages/calendar/www/view-one-day-display-postgresql.xql 26 Jul 2003 21:22:27 -0000 1.4 @@ -13,15 +13,14 @@ coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, - on_which_calendar as calendar_id, - (select calendar_name from calendars - where calendar_id = on_which_calendar) - as calendar_name + cals.calendar_id, + cals.calendar_name from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id @@ -31,6 +30,10 @@ and cal_items.cal_item_id= e.event_id and to_char(start_date, 'HH24:MI') = '00:00' and to_char(end_date, 'HH24:MI') = '00:00' +and cals.package_id= :package_id +and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) +and cals.calendar_id = ci.on_which_calendar +and e.event_id = ci.cal_item_id @@ -44,15 +47,14 @@ coalesce(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, - on_which_calendar as calendar_id, - (select calendar_name from calendars - where calendar_id = on_which_calendar) - as calendar_name + cals.calendar_id, + cals.calendar_name from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals where e.timespan_id = s.timespan_id and s.interval_id = t.interval_id and e.activity_id = a.activity_id @@ -62,6 +64,10 @@ and cal_items.cal_item_id= e.event_id and to_char(start_date, 'HH24:MI') <> '00:00' and to_char(end_date, 'HH24:MI') <> '00:00' +and cals.package_id= :package_id +and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) +and cals.calendar_id = ci.on_which_calendar +and e.event_id = ci.cal_item_id order by start_hour