From 1a29d43cb0fd3afe057928be6bf98c857232fea9 Mon Sep 17 00:00:00 2001 From: wyd621 Date: Wed, 19 Mar 2014 02:22:39 +0000 Subject: [PATCH] * code for task #1812. --- module/bug/control.php | 2 +- module/company/control.php | 4 ++-- module/doc/control.php | 4 ++-- module/productplan/control.php | 2 +- module/project/control.php | 2 +- module/story/model.php | 3 ++- module/testcase/control.php | 2 +- module/testtask/control.php | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index fc8934d466..c9f115f807 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -28,7 +28,7 @@ class bug extends control $this->loadModel('action'); $this->loadModel('story'); $this->loadModel('task'); - $this->products = $this->product->getPairs(); + $this->products = $this->product->getPairs('nocode'); if(empty($this->products)) { echo js::alert($this->lang->product->errorNoProduct); diff --git a/module/company/control.php b/module/company/control.php index 9f29c2c1be..efd05192da 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -194,12 +194,12 @@ class company extends control $queryID = ($browseType == 'bysearch') ? (int)$param : 0; /* Get products' list.*/ - $products = $this->loadModel('product')->getPairs(); + $products = $this->loadModel('product')->getPairs('nocode'); $products = array($this->lang->product->select) + $products; $this->view->products = $products; /* Get projects' list.*/ - $projects = $this->loadModel('project')->getPairs(); + $projects = $this->loadModel('project')->getPairs('nocode'); $projects = array($this->lang->project->select) + $projects; $this->view->projects = $projects; diff --git a/module/doc/control.php b/module/doc/control.php index ed7b125d63..c5d7355480 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -125,8 +125,8 @@ class doc extends control /* Build the search form. */ $this->config->doc->search['actionURL'] = $this->createLink('doc', 'browse', "libID=$libID&moduleID=$moduleID&procuctID=$productID&projectID=$projectID&browseType=bySearch&queryID=myQueryID"); $this->config->doc->search['queryID'] = $queryID; - $this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->product->getPairs() + array('all'=>$this->lang->doc->allProduct); - $this->config->doc->search['params']['project']['values'] = array(''=>'') + $this->project->getPairs() + array('all'=>$this->lang->doc->allProject); + $this->config->doc->search['params']['product']['values'] = array(''=>'') + $this->product->getPairs('nocode') + array('all'=>$this->lang->doc->allProduct); + $this->config->doc->search['params']['project']['values'] = array(''=>'') + $this->project->getPairs('nocode') + array('all'=>$this->lang->doc->allProject); $this->config->doc->search['params']['lib']['values'] = array(''=>'') + $this->libs; $this->config->doc->search['params']['type']['values'] = array(''=>'') + $this->config->doc->search['params']['type']['values']; diff --git a/module/productplan/control.php b/module/productplan/control.php index 28680daa36..cb2def24bc 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -325,7 +325,7 @@ class productplan extends control $this->loadModel('bug'); $plan = $this->productplan->getByID($planID); $this->commonAction($plan->product); - $products = $this->product->getPairs(); + $products = $this->product->getPairs('nocode'); $productID = $plan->product; $queryID = ($browseType == 'bysearch') ? (int)$param : 0; diff --git a/module/project/control.php b/module/project/control.php index bb5f73abe0..7215ebeb24 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -378,7 +378,7 @@ class project extends control $this->app->session->set('projectList', $uri); $this->loadModel('bug'); - $projects = $this->project->getPairs(); + $projects = $this->project->getPairs('nocode'); $this->project->setMenu($projects, $projectID); /* Load pager. */ diff --git a/module/story/model.php b/module/story/model.php index 12d7f9763f..12c0284685 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -970,10 +970,11 @@ class storyModel extends model * @param int $queryID * @param string $orderBy * @param object $pager + * @param string $projectID * @access public * @return array */ - public function getBySearch($productID, $queryID, $orderBy, $pager, $projectID = '') + public function getBySearch($productID, $queryID, $orderBy, $pager = null, $projectID = '') { if($projectID != '') { diff --git a/module/testcase/control.php b/module/testcase/control.php index 22413702ea..29ad8b9a20 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -25,7 +25,7 @@ class testcase extends control $this->loadModel('product'); $this->loadModel('tree'); $this->loadModel('user'); - $this->view->products = $this->products = $this->product->getPairs(); + $this->view->products = $this->products = $this->product->getPairs('nocode'); } /** diff --git a/module/testtask/control.php b/module/testtask/control.php index 29ccaeb542..3f550223f4 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -23,7 +23,7 @@ class testtask extends control { parent::__construct(); $this->loadModel('product'); - $this->view->products = $this->products = $this->product->getPairs(); + $this->view->products = $this->products = $this->product->getPairs('nocode'); } /**