From edc9a150aa5cbf6898e9fadf1fdb6ba4babe8ed8 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Thu, 5 Jan 2012 17:49:09 +0100 Subject: [PATCH] fix editeventdialog for monthly repeating events with a specific weekday and weeknumber combination --- apps/calendar/ajax/editeventform.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php index f605f33edbb..a3870626326 100644 --- a/apps/calendar/ajax/editeventform.php +++ b/apps/calendar/ajax/editeventform.php @@ -67,22 +67,22 @@ if($data['repeating'] == 1){ if(strlen($rrulearr['BYDAY']) == 2){ $repeat['weekdays'] = array($rrulearr['BYDAY']); }elseif(strlen($rrulearr['BYDAY']) == 3){ - $repeat['weekofmonth'] = substr($rrulearr['BYDAY'] , 0, 1); - $repeat['weekdays'] = array(substr($rrulearr['BYDAY'] , 1, 2)); + $repeat['weekofmonth'] = substr($rrulearr['BYDAY'], 0, 1); + $repeat['weekdays'] = array(substr($rrulearr['BYDAY'], 1, 2)); }elseif(strlen($rrulearr['BYDAY']) == 4){ - $repeat['weekofmonth'] = substr($rrulearr['BYDAY'] , 0, 2); - $repeat['weekdays'] = array(substr($rrulearr['BYDAY'] , 2, 2)); + $repeat['weekofmonth'] = substr($rrulearr['BYDAY'], 0, 2); + $repeat['weekdays'] = array(substr($rrulearr['BYDAY'], 2, 2)); } }else{ $byday_days = explode(',', $rrulearr['BYDAY']); foreach($byday_days as $byday_day){ if(strlen($byday_day) == 2){ $repeat['weekdays'][] = $byday_day; - }elseif(strlen($rrulearr['BYDAY']) == 3){ + }elseif(strlen($byday_day) == 3){ $repeat['weekofmonth'] = substr($byday_day , 0, 1); $repeat['weekdays'][] = substr($byday_day , 1, 2); - }elseif(strlen($rrulearr['BYDAY']) == 4){ - $repeat['byweekno'] = substr($byday_day , 0, 2); + }elseif(strlen($byday_day) == 4){ + $repeat['weekofmonth'] = substr($byday_day , 0, 2); $repeat['weekdays'][] = substr($byday_day , 2, 2); } } -- 2.39.5