* Fix build of project.
This commit is contained in:
@@ -25,16 +25,6 @@ class build extends control
|
||||
$this->loadModel('execution');
|
||||
$this->loadModel('user');
|
||||
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$model = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('model');
|
||||
$this->lang->project->menu = $this->lang->menu->$model;
|
||||
commonModel::setAppObjectID('project', $projectID);
|
||||
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = $executionID == 0 ? key($executions) : $executionID;
|
||||
}
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$executionID = $this->post->execution;
|
||||
@@ -48,18 +38,17 @@ class build extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
|
||||
}
|
||||
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
if($this->app->openApp == 'execution')
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
/* Set session and get execution by id. */
|
||||
$this->session->set('buildCreate', $this->app->getURI(true));
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
/* Set menu. */
|
||||
$executions = $this->execution->getPairs($execution->project);
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
commonModel::setAppObjectID('execution', $executionID);
|
||||
}
|
||||
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = $executionID == 0 ? key($executions) : $executionID;
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
}
|
||||
|
||||
$productGroups = $this->execution->getProducts($executionID);
|
||||
$productID = $productID ? $productID : key($productGroups);
|
||||
|
||||
@@ -849,7 +849,7 @@ class story extends control
|
||||
if($from == 'execution')
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$this->execution->setMenu($execution, $param);
|
||||
$this->execution->setMenu($executions, $param);
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
|
||||
@@ -39,10 +39,9 @@ class task extends control
|
||||
*/
|
||||
public function create($executionID = 0, $storyID = 0, $moduleID = 0, $taskID = 0, $todoID = 0)
|
||||
{
|
||||
commonModel::setAppObjectID('execution', $executionID);
|
||||
|
||||
$executions = $this->execution->getPairs();
|
||||
$executionID = $this->execution->saveState($executionID, $executions);
|
||||
$this->execution->setMenu($executions, $executionID);
|
||||
|
||||
$this->execution->getLimitedExecution();
|
||||
$limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : '';
|
||||
|
||||
Reference in New Issue
Block a user