Index: openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 18 Feb 2002 13:52:26 -0000 1.6 +++ openacs-4/packages/calendar-portlet/www/calendar-portlet.tcl 25 Feb 2002 19:31:45 -0000 1.7 @@ -13,7 +13,11 @@ set view $config(default_view) set list_of_calendar_ids $config(calendar_id) -# ad_return_complaint 1 "$cf" +if {[llength $list_of_calendar_ids] > 1} { + set force_calendar_id [calendar_have_private_p -return_id 1 [ad_conn user_id]] +} else { + set force_calendar_id [lindex $list_of_calendar_ids 0] +} # set up some vars set date [ns_queryget date] @@ -28,7 +32,7 @@ set cal_stuff [calendar::one_day_display \ -item_template {$item} \ - -hour_template "\$hour" \ + -hour_template "\$hour" \ -date $current_date -start_hour 7 -end_hour 22 \ -calendar_id_list $list_of_calendar_ids] @@ -46,7 +50,7 @@ -item_template {$item} \ -day_template "\$day_number" \ -date $current_date \ - -item_add_template "ADD" \ + -item_add_template "ADD" \ -calendar_id_list $list_of_calendar_ids] }