| @@ 177-195 (lines=19) @@ | ||
| 174 | } |
|
| 175 | ||
| 176 | //Validation if recurrence box is check |
|
| 177 | if ($event_calendar_repeating_events != 'no') { |
|
| 178 | $validation =''; |
|
| 179 | $repeats = get_input('repeats'); |
|
| 180 | $e->repeats = $repeats; |
|
| 181 | if ($repeats == 'yes') { |
|
| 182 | ||
| 183 | $dow = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); |
|
| 184 | foreach ($dow as $w) { |
|
| 185 | $v = 'event-calendar-repeating-'.$w.'-value'; |
|
| 186 | $event->$v = get_input($v); |
|
| 187 | if($event->$v == 1){ |
|
| 188 | $validation = '1'; |
|
| 189 | } |
|
| 190 | } |
|
| 191 | if (!$validation){ |
|
| 192 | return false; |
|
| 193 | } |
|
| 194 | } |
|
| 195 | } |
|
| 196 | ||
| 197 | // ok, the input passes the validation so put the values in the real event object |
|
| 198 | ||
| @@ 558-576 (lines=19) @@ | ||
| 555 | } |
|
| 556 | ||
| 557 | //Validation if recurrence box is check |
|
| 558 | if ($event_calendar_repeating_events != 'no') { |
|
| 559 | $validation =''; |
|
| 560 | $repeats = get_input('repeats'); |
|
| 561 | $e->repeats = $repeats; |
|
| 562 | if ($repeats == 'yes') { |
|
| 563 | ||
| 564 | $dow = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); |
|
| 565 | foreach ($dow as $w) { |
|
| 566 | $v = 'event-calendar-repeating-'.$w.'-value'; |
|
| 567 | $event->$v = get_input($v); |
|
| 568 | if($event->$v == 1){ |
|
| 569 | $validation = '1'; |
|
| 570 | } |
|
| 571 | } |
|
| 572 | if (!$validation){ |
|
| 573 | return false; |
|
| 574 | } |
|
| 575 | } |
|
| 576 | } |
|
| 577 | $keys = array( |
|
| 578 | 'title', |
|
| 579 | 'access_id', |
|