diff options
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index a748ef9a..5c73d7b7 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -30,7 +30,7 @@ define('OG_REST_CMD_RUN_TASK', 'task/run'); define('OG_REST_CMD_CREATE_SCHEDULE', 'schedule/create'); define('OG_REST_CMD_DELETE_SCHEDULE', 'schedule/delete'); define('OG_REST_CMD_UPDATE_SCHEDULE', 'schedule/update'); -define('OG_REST_CMD_SCHEDULE', 'schedule'); +define('OG_REST_CMD_GET_SCHEDULE', 'schedule/get'); define('OG_REST_PARAM_CLIENTS', 'clients'); define('OG_REST_PARAM_ADDR', 'addr'); @@ -619,13 +619,15 @@ function update_schedule($schedule_id, $task_id, $name, $years, $months, $days, return common_request(OG_REST_CMD_UPDATE_SCHEDULE, POST, $data); } -function get_schedule($task_id = null) { +function get_schedule($task_id = null, $schedule_id = null) { if (isset($task_id)) $data = array(OG_REST_PARAM_TASK => strval($task_id)); + else if (isset($schedule_id)) + $data = array(OG_REST_PARAM_ID => strval($schedule_id)); else $data = null; - $result = common_request(OG_REST_CMD_SCHEDULE, POST, $data); + $result = common_request(OG_REST_CMD_GET_SCHEDULE, POST, $data); return $result; } |