/** * Approve (confirm the result of) a specified task */ public function approve($id) { global $USER; $result = array(); if ($id = $this->checkTaskId($id)) { $task = new \CTaskItem($id, $USER->GetId()); $task->approve(); } return $result; }