Index: openacs-4/packages/calendar/www/cal-options.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-options.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/calendar/www/cal-options.tcl 26 Jul 2003 20:55:11 -0000 1.7 +++ openacs-4/packages/calendar/www/cal-options.tcl 26 Jul 2003 21:24:36 -0000 1.8 @@ -1,12 +1,10 @@ -# /packages/calendar/www/cal-nav.tcl ad_page_contract { - option pages - - list all the calendars that has + List all the calendars for which the user has the read privilege the user has read privilege - @author Gary Jin (gjin@arsdigita.com) + @author Dirk Gomez (openacs@dirkgomez.de) + @authorr Gary Jin (gjin@arsdigita.com) @author Ben Adida (ben@openforce.net) @creation-date Dec 14, 2000, May 29th, 2002 @cvs-id $Id$ Index: openacs-4/packages/calendar/www/view-list-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-list-display.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-list-display.tcl 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-list-display.tcl 26 Jul 2003 21:22:49 -0000 1.3 @@ -1,13 +1,5 @@ -# If we were given no calendars, we assume we display the -# private calendar. It makes no sense for this to be called with -# no data whatsoever. -if {[empty_string_p $calendar_id_list]} { - set calendar_id_list [list [calendar_have_private_p -return_id 1 [ad_get_user_id]]] - set calendar_where_clause " and e.event_id in ([join $calendar_id_list ","])" -} else { - set calendar_where_clause "" -} - +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] # sort by cannot be empty if {[empty_string_p $sort_by]} { set sort_by "start_date" Index: openacs-4/packages/calendar/www/view-month-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-month-display.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-month-display.tcl 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-month-display.tcl 26 Jul 2003 21:22:49 -0000 1.3 @@ -5,15 +5,8 @@ } dt_get_info $date -# If we were given no calendars, we assume we display the private calendar. It -# makes no sense for this to be called with no data whatsoever. - -if {![info exists calendar_id_list] || [empty_string_p $calendar_id_list]} { - set calendar_id_list [list [calendar_have_private_p -return_id 1 [ad_get_user_id]]] -} - - - +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] set today_date [dt_sysdate] set next_month_url "" set prev_month_url "" @@ -63,6 +56,7 @@ multirow append days_of_a_month $name $item_id [dt_julian_to_ansi $current_day] $ansi_start_time $display_information(day_number) $calendar_name $display_information(beginning_of_week_p) $display_information(end_of_week_p) $display_information(today_p) f } + for {} {$current_day <= $last_julian_date_in_month} {incr current_day} { array set display_information [calendar::get_month_multirow_information -current_day $current_day -today_julian_date $today_julian_date -first_julian_date_of_month $first_julian_date_of_month] multirow append days_of_a_month "" "" [dt_julian_to_ansi $current_day] "" $display_information(day_number) "" $display_information(beginning_of_week_p) $display_information(end_of_week_p) $display_information(today_p) f Index: openacs-4/packages/calendar/www/view-one-day-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-one-day-display.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/calendar/www/view-one-day-display.tcl 22 Jul 2003 15:32:06 -0000 1.3 +++ openacs-4/packages/calendar/www/view-one-day-display.tcl 26 Jul 2003 21:22:49 -0000 1.4 @@ -7,17 +7,9 @@ set date [dt_sysdate] } set current_date $date +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] -# The following code is original code which I don't really grasp yet. (Dirk) -# ---------------------- -# If we were given no calendars, we assume we display the -# private calendar. It makes no sense for this to be called with -# no data whatsoever. -if {[empty_string_p $calendar_id_list]} { - set calendar_id_list [list [calendar_have_private_p -return_id 1 [ad_get_user_id]]] -} -# ---------------------- - # Loop through the calendars multirow create day_items_without_time name status_summary item_id calendar_name Index: openacs-4/packages/calendar/www/view-week-display.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/view-week-display.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-week-display.tcl 21 Jul 2003 19:21:36 -0000 1.2 +++ openacs-4/packages/calendar/www/view-week-display.tcl 26 Jul 2003 21:22:49 -0000 1.3 @@ -12,6 +12,8 @@ set calendar_id_list [list [calendar_have_private_p -return_id 1 [ad_get_user_id]]] } +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] db_1row select_weekday_info {} db_1row select_week_info {}