fix editeventdialog for monthly repeating events with a specific weekday and weeknumber combination
This commit is contained in:
parent
d3a0c7354c
commit
edc9a150aa
1 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue