| @@ 330-336 (lines=7) @@ | ||
| 327 | if ($mode!='daily') { |
|
| 328 | switch ($mode) { |
|
| 329 | case 'weekly': |
|
| 330 | if (isset($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
| 331 | if ($this->validateScheduleWeekDays($rows[$locationsFieldsMapping['schedule_weekdays']])) { |
|
| 332 | $schedule.='"weekdays":['.$rows[$locationsFieldsMapping['schedule_weekdays']].']}'; |
|
| 333 | } |
|
| 334 | else {array_push($results['fail'],"$iRow --> Wrong weekdays"); $schedule="";} |
|
| 335 | } |
|
| 336 | else {array_push($results['fail'],"$iRow --> The parameters sched_weekdays is not set"); $schedule="";} |
|
| 337 | break; |
|
| 338 | case 'monthly': |
|
| 339 | $monthlyMode=""; |
|
| @@ 360-366 (lines=7) @@ | ||
| 357 | } |
|
| 358 | break; |
|
| 359 | case 'nth': |
|
| 360 | if (isset($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
| 361 | if ($this->validateScheduleNthN($rows[$locationsFieldsMapping['monthly_nth_n']])) { |
|
| 362 | $schedule.='"nth":{"n":'.$rows[$locationsFieldsMapping['monthly_nth_n']].','; |
|
| 363 | } |
|
| 364 | else {array_push($results['fail'],"$iRow --> Wrong parameter sched_nth_n"); $schedule="";} |
|
| 365 | } |
|
| 366 | else {array_push($results['fail'],"$iRow --> The parameter sched_nth_n is not set"); $schedule="";} |
|
| 367 | ||
| 368 | if ($schedule!="") { |
|
| 369 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
| @@ 368-376 (lines=9) @@ | ||
| 365 | } |
|
| 366 | else {array_push($results['fail'],"$iRow --> The parameter sched_nth_n is not set"); $schedule="";} |
|
| 367 | ||
| 368 | if ($schedule!="") { |
|
| 369 | if (isset($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
| 370 | if ($this->validateScheduleNthWhat($rows[$locationsFieldsMapping['monthly_nth_wwhat']])) { |
|
| 371 | $schedule.='"what":'.$rows[$locationsFieldsMapping['monthly_nth_wwhat']].'}}'; |
|
| 372 | } |
|
| 373 | else {array_push($results['fail'],"$iRow --> Wrong parameter sched_nth_what"); $schedule="";} |
|
| 374 | } |
|
| 375 | else {array_push($results['fail'],"$iRow --> The parameter sched_nth_what is not set"); $schedule="";} |
|
| 376 | } |
|
| 377 | ||
| 378 | break; |
|
| 379 | } |
|