From 9102125d7b337a4f3cbaefc267895cb76bfce876 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 18 Aug 2023 09:11:13 +0800 Subject: [PATCH] * Refactor delete method. --- module/task/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 876d5ca4a2..41024dbbb4 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -911,17 +911,17 @@ class task extends control } /** + * 删除一个任务。 * Delete a task. * * @param int $executionID * @param int $taskID - * @param string $confirm yes|no * @access public * @return void */ - public function delete($executionID, $taskID, $confirm = 'no') + public function delete(int $executionID, int $taskID) { - $task = $this->task->getById($taskID); + $task = $this->task->getByID($taskID); if($task->parent == 0) return $this->send(array('result' => 'fail', 'message' => $this->lang->task->cannotDeleteParent)); $this->task->delete(TABLE_TASK, $taskID);