diff --git a/module/bug/control.php b/module/bug/control.php index 6e98fc5075..e453fbf0ec 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -65,7 +65,7 @@ class bug extends control { /* Set browseType, productID, moduleID and queryID. */ $browseType = strtolower($browseType); - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $moduleID = ($browseType == 'bymodule') ? (int)$param : 0; $queryID = ($browseType == 'bysearch') ? (int)$param : 0; @@ -273,7 +273,7 @@ class bug extends control } /* Get product, then set menu. */ - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $this->bug->setMenu($this->products, $productID); /* Remove the unused types. */ diff --git a/module/testcase/control.php b/module/testcase/control.php index 75dc8acda2..482c3e7bbb 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -56,7 +56,7 @@ class testcase extends control { /* Set browseType, productID, moduleID and queryID. */ $browseType = strtolower($browseType); - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $moduleID = ($browseType == 'bymodule') ? (int)$param : 0; $queryID = ($browseType == 'bysearch') ? (int)$param : 0; @@ -158,7 +158,7 @@ class testcase extends control if(empty($this->products)) $this->locate($this->createLink('product', 'create')); /* Set productID and currentModuleID. */ - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $currentModuleID = (int)$moduleID; /* Set menu. */ diff --git a/module/testtask/control.php b/module/testtask/control.php index 88817ab5cb..0eef072f85 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -54,7 +54,7 @@ class testtask extends control $this->session->set('testtaskList', $this->app->getURI(true)); /* Set menu. */ - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $this->testtask->setMenu($this->products, $productID); /* Load pager. */ @@ -91,7 +91,7 @@ class testtask extends control } /* Set menu. */ - $productID = $this->product->saveState($productID, key($this->products)); + $productID = $this->product->saveState($productID, $this->products); $this->testtask->setMenu($this->products, $productID); $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->create; @@ -206,7 +206,7 @@ class testtask extends control /* Get task info. */ $task = $this->testtask->getById($taskID); - $productID = $this->product->saveState($task->product, key($this->products)); + $productID = $this->product->saveState($task->product, $this->products); /* Set menu. */ $this->testtask->setMenu($this->products, $productID); @@ -264,7 +264,7 @@ class testtask extends control /* Get task and product id. */ $task = $this->testtask->getById($taskID); - $productID = $this->product->saveState($task->product, key($this->products)); + $productID = $this->product->saveState($task->product, $this->products); /* Build the search form. */ $this->loadModel('testcase');