* return before $this->send.
This commit is contained in:
@@ -1285,20 +1285,20 @@ class execution extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$executionID = $this->execution->create($copyExecutionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->execution->updateProducts($executionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create($this->objectType, $executionID, 'opened', '', join(',', $_POST['products']));
|
||||
|
||||
$this->executeHooks($executionID);
|
||||
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $executionID));
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $executionID));
|
||||
|
||||
if($this->app->openApp == 'doc')
|
||||
{
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
|
||||
}
|
||||
|
||||
$planID = '';
|
||||
@@ -1312,11 +1312,11 @@ class execution extends control
|
||||
|
||||
if(!empty($planID))
|
||||
{
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=no")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=no")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1379,10 +1379,10 @@ class execution extends control
|
||||
|
||||
$oldProducts = $this->execution->getProducts($executionID);
|
||||
$changes = $this->execution->update($executionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->execution->updateProducts($executionID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($action == 'undelete')
|
||||
{
|
||||
$this->loadModel('action');
|
||||
@@ -1415,7 +1415,7 @@ class execution extends control
|
||||
}
|
||||
|
||||
$this->executeHooks($executionID);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "executionID=$executionID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "executionID=$executionID")));
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
@@ -2335,7 +2335,7 @@ class execution extends control
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
$this->send($response);
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->inlink('team', "executionID=$executionID"), 'parent'));
|
||||
}
|
||||
@@ -2492,7 +2492,7 @@ class execution extends control
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
$this->send($response);
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->app->session->storyList, 'parent'));
|
||||
}
|
||||
@@ -2777,11 +2777,11 @@ class execution extends control
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
$this->send($response);
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('story', $storyID, 'estimated', '', $executionID);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('execution', 'storyEstimate', "executionID=$executionID&storyID=$storyID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('execution', 'storyEstimate', "executionID=$executionID&storyID=$storyID")));
|
||||
}
|
||||
|
||||
$estimateInfo = $this->story->getEstimateInfo($storyID, $round);
|
||||
|
||||
Reference in New Issue
Block a user