diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-03-06 14:26:23 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-06-02 12:32:36 +0200 |
commit | 0549150265a132055b3c700d36137da20908e2b4 (patch) | |
tree | e9f0ef5d57759339108d11748fc0701011e1eecf | |
parent | e3a1d64f1128d1a2cf3892cf7e36a00facc463ce (diff) |
#942 Add weeks and week_days to the webconsole schedule (web)
-rw-r--r-- | admin/WebConsole/gestores/gestor_programaciones.php | 4 | ||||
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/admin/WebConsole/gestores/gestor_programaciones.php b/admin/WebConsole/gestores/gestor_programaciones.php index 5bd49b7c..8aa0078b 100644 --- a/admin/WebConsole/gestores/gestor_programaciones.php +++ b/admin/WebConsole/gestores/gestor_programaciones.php @@ -83,8 +83,8 @@ if($pswop!=$op_suspension){ switch($pswop){ case $op_alta: $result = create_schedule($pidentificador, - $pnombrebloque, $pannos, $pmeses, $pdiario, - $phoras, $pampm, $pminutos); + $pnombrebloque, $pannos, $pmeses, $psemanas, + $pdias, $pdiario, $phoras, $pampm, $pminutos); $swop=$op_alta; $schedule = get_schedule($pidentificador); $idr = max(array_column($schedule['schedule'], OG_REST_PARAM_ID)); diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 5c73d7b7..66af9d9f 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -68,6 +68,8 @@ define('OG_REST_PARAM_TASK', 'task'); define('OG_REST_PARAM_TIME_PARAMS', 'time_params'); define('OG_REST_PARAM_YEARS', 'years'); define('OG_REST_PARAM_MONTHS', 'months'); +define('OG_REST_PARAM_WEEKS', 'weeks'); +define('OG_REST_PARAM_WEEK_DAYS', 'week_days'); define('OG_REST_PARAM_DAYS', 'days'); define('OG_REST_PARAM_HOURS', 'hours'); define('OG_REST_PARAM_AM_PM', 'am_pm'); @@ -571,8 +573,8 @@ function run_task($task_id) { return common_request(OG_REST_CMD_RUN_TASK, POST, $data); } -function create_schedule($task_id, $name, $years, $months, $days, $hours, - $am_pm, $minutes) { +function create_schedule($task_id, $name, $years, $months, $weeks, $week_days, + $days, $hours, $am_pm, $minutes) { $data = array ( OG_REST_PARAM_TASK => $task_id, @@ -580,6 +582,8 @@ function create_schedule($task_id, $name, $years, $months, $days, $hours, OG_REST_PARAM_TIME_PARAMS => array ( OG_REST_PARAM_YEARS => intval($years), OG_REST_PARAM_MONTHS => intval($months), + OG_REST_PARAM_WEEKS => intval($weeks), + OG_REST_PARAM_WEEK_DAYS => intval($week_days), OG_REST_PARAM_DAYS => intval($days), OG_REST_PARAM_HOURS => intval($hours), OG_REST_PARAM_AM_PM => intval($am_pm), |