* Adjust block module code.
This commit is contained in:
@@ -62,9 +62,9 @@ class executionModel extends model
|
||||
*/
|
||||
public function setMenu($executions, $executionID, $buildID = 0, $extra = '')
|
||||
{
|
||||
$project = $this->getByID($this->session->project);
|
||||
if(empty($executions))
|
||||
{
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
if($project->model == 'waterfall')
|
||||
{
|
||||
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'execution') die(js::locate(helper::createLink('programplan', 'create', "projectID=$project->id")));
|
||||
@@ -77,11 +77,8 @@ class executionModel extends model
|
||||
|
||||
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
|
||||
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
|
||||
|
||||
$this->session->set('execution', $executionID);
|
||||
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
/* Unset story, bug, build and testtask if type is ops. */
|
||||
$execution = $this->getByID($executionID);
|
||||
if($execution and $execution->lifetime == 'ops')
|
||||
@@ -94,7 +91,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* Hide story and qa menu when execution is story or design type. */
|
||||
if($execution and ($execution->attribute == 'story' || $execution->attribute == 'design'))
|
||||
if($execution and ($execution->attribute == 'story' or $execution->attribute == 'design'))
|
||||
{
|
||||
unset($this->lang->execution->menu->story);
|
||||
unset($this->lang->execution->menu->qa);
|
||||
|
||||
Reference in New Issue
Block a user