Index: openacs-4/packages/calendar/www/cal-item-create-recurrence-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-item-create-recurrence-2.tcl,v diff -u -r1.4 -r1.4.6.1 --- openacs-4/packages/calendar/www/cal-item-create-recurrence-2.tcl 22 Jul 2002 21:46:19 -0000 1.4 +++ openacs-4/packages/calendar/www/cal-item-create-recurrence-2.tcl 23 Nov 2003 23:31:57 -0000 1.4.6.1 @@ -15,11 +15,23 @@ recur_until:array days_of_week:multiple {return_url "./"} -} +} + # Verify permission ad_require_permission $cal_item_id cal_item_write +# Get basic information about the event. We need the start date +calendar::item::get -cal_item_id $cal_item_id -array cal_item + +set end_date [calendar_make_datetime [array get recur_until]] +set start_date $cal_item(start_date) + +if {![calendar::item::dates_valid_p -start_date $$cal_item(start_date) -end_date $end_date]} { + ad_return_complaint 1 [_ calendar.start_date_before_end_date] + ad_script_abort +} + # Set up the recurrence calendar::item::add_recurrence -cal_item_id $cal_item_id -interval_type $interval_type -every_n $every_n -days_of_week $days_of_week -recur_until [calendar_make_datetime [array get recur_until]]