diff --git a/module/build/control.php b/module/build/control.php index 0c49f66a62..56a2e98ac2 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -205,8 +205,8 @@ class build extends control foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage; /* Set menu. */ - $this->loadModel('execution')->setMenu($this->execution->getPairs($this->session->PRJ), $build->execution, $buildID); - $executions = $this->execution->getPairs($this->session->PRJ, 'all', 'empty'); + commonModel::setAppObjectID('execution', $build->execution); + $executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'empty'); $this->view->title = "BUILD #$build->id $build->name - " . $executions[$build->execution]; $this->view->position[] = html::a($this->createLink('execution', 'task', "executionID=$build->execution"), $executions[$build->execution]); diff --git a/module/execution/control.php b/module/execution/control.php index 0be9080db5..8b8519cf77 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -540,7 +540,7 @@ class execution extends control $this->app->session->set('executionList', $uri); $this->loadModel('bug'); - $executions = $this->execution->getPairs($this->session->PRJ, 'all', 'nocode'); + $executions = $this->execution->getPairs(0, 'all', 'nocode'); $this->execution->setMenu($executions, $executionID); /* Load pager. */ @@ -1052,7 +1052,7 @@ class execution extends control $this->view->orderBy = $orderBy; $this->view->tasks = $productTasks; $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); - $this->view->products = $this->loadModel('product')->getPairs('', $this->session->PRJ); + $this->view->products = $this->loadModel('product')->getPairs('', 0); $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. $this->display(); @@ -2963,7 +2963,7 @@ class execution extends control $this->view->cases = $cases; $this->view->story = $story; $this->view->users = $users; - $this->view->executions = $this->loadModel('execution')->getPairs($this->session->PRJ, 'all', 'nocode'); + $this->view->executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode'); $this->view->actions = $this->loadModel('action')->getList('story', $storyID); $this->view->modulePath = $modulePath; $this->view->version = $version == 0 ? $story->version : $version; diff --git a/module/product/model.php b/module/product/model.php index 33f6921931..febb71a391 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -763,7 +763,6 @@ class productModel extends model if($browseType == 'changedstory') $stories = $this->story->getByStatus($productID, $branch, $modules, 'changed', $type, $sort, $pager); if($browseType == 'willclose') $stories = $this->story->get2BeClosed($productID, $branch, $modules, $type, $sort, $pager); if($browseType == 'closedstory') $stories = $this->story->getByStatus($productID, $branch, $modules, 'closed', $type, $sort, $pager); - if($browseType == 'emptysr') $stories = $this->story->getEmptySR($productID, $branch, $modules, '', $type, $sort, $pager); return $stories; } diff --git a/module/task/control.php b/module/task/control.php index 8c2da8f404..716aa93ec3 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -41,7 +41,7 @@ class task extends control { commonModel::setAppObjectID('execution', $executionID); - $executions = $this->execution->getPairs($this->session->PRJ); + $executions = $this->execution->getPairs(); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->getLimitedExecution(); @@ -208,7 +208,7 @@ class task extends control $this->view->title = $title; $this->view->position = $position; $this->view->execution = $execution; - $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject($this->session->PRJ, 'all', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $executions : $this->execution->getByProject(0, 'all', 0, true); $this->view->task = $task; $this->view->users = $users; $this->view->stories = $stories; @@ -250,7 +250,7 @@ class task extends control $storyLink = $this->session->storyList ? $this->session->storyList : $this->createLink('execution', 'story', "executionID=$executionID"); /* Set menu. */ - $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id); + $this->execution->setMenu($this->execution->getPairs(), $execution->id); /* When common task are child tasks, query whether common task are consumed. */ $taskConsumed = 0; @@ -319,7 +319,7 @@ class task extends control $this->view->actions = $this->loadModel('action')->getList('task', $taskID); /* Set menu. */ - $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $this->view->execution->id); + $this->execution->setMenu($this->execution->getPairs(), $this->view->execution->id); $this->view->position[] = html::a($this->createLink('execution', 'browse', "execution={$this->view->task->execution}"), $this->view->execution->name); } @@ -394,7 +394,7 @@ class task extends control $this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}"); $this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : ''; $this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : ''); - $this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($this->session->PRJ, 'all', 0, true); + $this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject(0, 'all', 0, true); $this->display(); } @@ -447,7 +447,7 @@ class task extends control if($executionID) { $execution = $this->execution->getById($executionID); - $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id); + $this->execution->setMenu($this->execution->getPairs(), $execution->id); /* Set modules and members. */ $showAllModule = isset($this->config->task->allModule) ? $this->config->task->allModule : ''; @@ -656,7 +656,7 @@ class task extends control /* Set menu. */ $execution = $this->execution->getById($task->execution); - $this->execution->setMenu($this->execution->getPairs($this->session->PRJ), $execution->id); + $this->execution->setMenu($this->execution->getPairs(), $execution->id); $this->executeHooks($taskID); @@ -1324,7 +1324,7 @@ class task extends control } } - $executions = $this->execution->getPairs($this->session->PRJ); + $executions = $this->execution->getPairs(); $this->execution->setMenu($executions, $executionID); $this->executions = $executions;