@@ 388-394 (lines=7) @@ | ||
385 | if ($mode!='daily') { |
|
386 | switch ($mode) { |
|
387 | case 'weekly': |
|
388 | if (isset($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
389 | if ($this->validateScheduleWeekDays($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
390 | $curSchedule.='"weekdays":['.$rows[$locationsFieldsMapping['schedule_weekdays']].']}'; |
|
391 | } else { |
|
392 | array_push($results['fail'],"$iRow --> Wrong weekdays"); |
|
393 | $curSchedule = ""; |
|
394 | } |
|
395 | } else { |
|
396 | array_push($results['fail'],"$iRow --> The parameters sched_weekdays is not set"); |
|
397 | $curSchedule = ""; |
|
@@ 428-434 (lines=7) @@ | ||
425 | } |
|
426 | break; |
|
427 | case 'nth': |
|
428 | if (isset($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
429 | if ($this->validateScheduleNthN($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
430 | $curSchedule.='"nth":{"n":'.$rows[$locationsFieldsMapping['monthly_nth_n']].','; |
|
431 | } else { |
|
432 | array_push($results['fail'],"$iRow --> Wrong parameter sched_nth_n"); |
|
433 | $curSchedule = ""; |
|
434 | } |
|
435 | } else { |
|
436 | array_push($results['fail'],"$iRow --> The parameter sched_nth_n is not set"); |
|
437 | $curSchedule = ""; |
|
@@ 440-448 (lines=9) @@ | ||
437 | $curSchedule = ""; |
|
438 | } |
|
439 | ||
440 | if ($curSchedule != "") { |
|
441 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
442 | if ($this->validateScheduleNthWhat($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
443 | $curSchedule.='"what":'.$rows[$locationsFieldsMapping['monthly_nth_wwhat']].'}}'; |
|
444 | } else { |
|
445 | array_push($results['fail'],"$iRow --> Wrong parameter sched_nth_what"); |
|
446 | $curSchedule = ""; |
|
447 | } |
|
448 | } else { |
|
449 | array_push($results['fail'],"$iRow --> The parameter sched_nth_what is not set"); |
|
450 | $curSchedule = ""; |
|
451 | } |