summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-03-06 14:26:23 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-02 12:32:36 +0200
commit0549150265a132055b3c700d36137da20908e2b4 (patch)
treee9f0ef5d57759339108d11748fc0701011e1eecf /admin/WebConsole/includes
parente3a1d64f1128d1a2cf3892cf7e36a00facc463ce (diff)
#942 Add weeks and week_days to the webconsole schedule (web)
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php8
1 files changed, 6 insertions, 2 deletions
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),