]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix editeventdialog for monthly repeating events with a specific weekday and weeknumb...
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 16:49:09 +0000 (17:49 +0100)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 16:49:09 +0000 (17:49 +0100)
apps/calendar/ajax/editeventform.php

index f605f33edbbb0938e50319292841d40ff290fbbc..a38706263264b776c1ba251ab439c3dfb3b231ad 100644 (file)
@@ -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);
                                }
                        }