* Adjust project execution return data for api.
This commit is contained in:
@@ -748,13 +748,18 @@ class project extends control
|
||||
$project = $this->project->getByID($projectID);
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
if(!$projectID) return $this->send(array('result' => 'fail', 'locate' => inlink('browse')));
|
||||
if(!$projectID) return $this->locate(inlink('browse'));
|
||||
if(!$project->multiple)
|
||||
{
|
||||
$executionID = $this->execution->getNoMultipleID($projectID);
|
||||
return print(js::locate($this->createLink('execution', 'task', "executionID=$executionID")));
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
$this->view->executionStats = array($this->execution->getByID($executionID));
|
||||
return $this->display();
|
||||
}
|
||||
return $this->locate($this->createLink('execution', 'task', "executionID=$executionID"));
|
||||
}
|
||||
if(!empty($project->model) and $project->model == 'kanban' and !(defined('RUN_MODE') and RUN_MODE == 'api')) return $this->send(array('result' => 'fail', 'locate' => inlink('index', "projectID=$projectID")));
|
||||
if(!empty($project->model) && $project->model == 'kanban' && !(defined('RUN_MODE') && RUN_MODE == 'api')) return $this->locate(inlink('index', "projectID=$projectID"));
|
||||
|
||||
/* Load pager and get tasks. */
|
||||
$this->app->loadClass('pager', true);
|
||||
|
||||
Reference in New Issue
Block a user