Index: openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl 2 Jun 2005 09:01:22 -0000 1.10 +++ openacs-4/packages/calendar-portlet/www/calendar-list-portlet.tcl 15 May 2007 20:14:23 -0000 1.11 @@ -25,7 +25,7 @@ {page_num ""} {date ""} {julian_date ""} - {period_days 60} + {period_days:optional} {sort_by ""} } -properties { @@ -47,6 +47,17 @@ } set list_of_calendar_ids $config(calendar_id) +# Set the first list entry to calendar_id. Will not be used if under +# dotlrn. Otherwise the list will actually contain only one calendar_id +# (the first one, though) +set calendar_id [lindex $list_of_calendar_ids 0] +# Get the package_id depending on which calender_id was set +db_0or1row select_calendar_package_id {select package_id from calendars where calendar_id=:calendar_id} + +if { ![info exists period_days] } { + set period_days [parameter::get -package_id $package_id -parameter ListView_DefaultPeriodDays -default 31] +} + set scoped_p $config(scoped_p) if {$scoped_p == "t"} { set show_calendar_name_p 1