| @@ 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 | ||
| @@ 664-682 (lines=19) @@ | ||
| 661 | } |
|
| 662 | ||
| 663 | //Validation if recurrence box is check |
|
| 664 | if ($event_calendar_repeating_events != 'no') { |
|
| 665 | $validation =''; |
|
| 666 | $repeats = get_input('repeats'); |
|
| 667 | $e->repeats = $repeats; |
|
| 668 | if ($repeats == 'yes') { |
|
| 669 | ||
| 670 | $dow = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'); |
|
| 671 | foreach ($dow as $w) { |
|
| 672 | $v = 'event-calendar-repeating-'.$w.'-value'; |
|
| 673 | $event->$v = get_input($v); |
|
| 674 | if($event->$v == 1){ |
|
| 675 | $validation = '1'; |
|
| 676 | } |
|
| 677 | } |
|
| 678 | if (!$validation){ |
|
| 679 | return false; |
|
| 680 | } |
|
| 681 | } |
|
| 682 | } |
|
| 683 | $keys = array( |
|
| 684 | 'title', |
|
| 685 | 'access_id', |
|