Index: openacs-4/packages/calendar/www/view-week-display-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-week-display-postgresql.xql 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-week-display-postgresql.xql 26 Jul 2003 21:13:41 -0000 1.3 @@ -30,28 +30,24 @@ 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, - (select on_which_calendar from cal_items where cal_item_id = e.event_id) as calendar_id, - (select calendar_name from calendars - where calendar_id = (select on_which_calendar from cal_items where cal_item_id= e.event_id)) - 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 e.event_id = cal_items.cal_item_id and start_date between to_date(:sunday_of_the_week,'YYYY-MM-DD') and to_date(:saturday_of_the_week,'YYYY-MM-DD') -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar in ([join $calendar_id_list ","]) - ) +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_date_julian, start_time