@@ 408-414 (lines=7) @@ | ||
405 | if ($mode!='daily') { |
|
406 | switch ($mode) { |
|
407 | case 'weekly': |
|
408 | if (isset($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
409 | if ($this->validateScheduleWeekDays($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
410 | $curSchedule .= '"weekdays":['.$rows[$locationsFieldsMapping['schedule_weekdays']].']}'; |
|
411 | } else { |
|
412 | array_push($results['fail'], "$iRow --> Wrong weekdays"); |
|
413 | $curSchedule = ""; |
|
414 | } |
|
415 | } else { |
|
416 | array_push($results['fail'], "$iRow --> The parameters sched_weekdays is not set"); |
|
417 | $curSchedule = ""; |
|
@@ 448-454 (lines=7) @@ | ||
445 | } |
|
446 | break; |
|
447 | case 'nth': |
|
448 | if (isset($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
449 | if ($this->validateScheduleNthN($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
450 | $curSchedule .= '"nth":{"n":'.$rows[$locationsFieldsMapping['monthly_nth_n']].','; |
|
451 | } else { |
|
452 | array_push($results['fail'], "$iRow --> Wrong parameter sched_nth_n"); |
|
453 | $curSchedule = ""; |
|
454 | } |
|
455 | } else { |
|
456 | array_push($results['fail'], "$iRow --> The parameter sched_nth_n is not set"); |
|
457 | $curSchedule = ""; |
|
@@ 460-468 (lines=9) @@ | ||
457 | $curSchedule = ""; |
|
458 | } |
|
459 | ||
460 | if ($curSchedule != "") { |
|
461 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
462 | if ($this->validateScheduleNthWhat($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
463 | $curSchedule .= '"what":'.$rows[$locationsFieldsMapping['monthly_nth_wwhat']].'}}'; |
|
464 | } else { |
|
465 | array_push($results['fail'], "$iRow --> Wrong parameter sched_nth_what"); |
|
466 | $curSchedule = ""; |
|
467 | } |
|
468 | } else { |
|
469 | array_push($results['fail'], "$iRow --> The parameter sched_nth_what is not set"); |
|
470 | $curSchedule = ""; |
|
471 | } |