* Return id when create object by API.

This commit is contained in:
holan20180123
2021-05-12 17:33:59 +08:00
parent bfd4d6c323
commit 51af4491d9
14 changed files with 61 additions and 18 deletions
+9
View File
@@ -131,6 +131,9 @@ class task extends control
$this->executeHooks($taskID);
/* Return task id when call the API. */
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID));
/* If link from no head then reload. */
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
@@ -284,6 +287,12 @@ class task extends control
$mails = $this->task->batchCreate($executionID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$taskIDList = array();
foreach($mails as $mail) $taskIDList[] = $mail->taskID;
/* Return task id list when call the API. */
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $taskIDList));
/* Locate the browser. */
if(!empty($iframe)) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $taskLink));