From d6b59ef12549d041c313041da592b75a26a5a531 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 21 Oct 2020 16:01:26 +0800 Subject: [PATCH] * Fix bugs. --- module/bug/control.php | 2 +- module/product/control.php | 2 +- module/program/control.php | 2 +- module/program/view/pgmbrowsebylist.html.php | 1 - module/qa/control.php | 2 +- module/testcase/control.php | 2 +- module/testreport/control.php | 2 +- module/testsuite/control.php | 2 +- module/testtask/control.php | 2 +- 9 files changed, 8 insertions(+), 9 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 7c6004df5a..135ee65d4f 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -31,7 +31,7 @@ class bug extends control $this->loadModel('action'); $this->loadModel('story'); $this->loadModel('task'); - $this->view->products = $this->products = $this->product->getPairs('nocode', $this->session->PRJ); + $this->view->products = $this->products = $this->product->getPairs('nocode'); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug"))); } diff --git a/module/product/control.php b/module/product/control.php index f0a85a7cb2..885178ef78 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -31,7 +31,7 @@ class product extends control /* Get all products, if no, goto the create page. */ $this->products = $this->product->getPairs('nocode'); - if(empty($this->products) and strpos(',all,create,index,showerrornone,', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and strpos(',create,index,showerrornone,', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); $this->view->products = $this->products; } diff --git a/module/program/control.php b/module/program/control.php index 6fd79b49fa..accd1e924c 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -435,7 +435,7 @@ class program extends control /* Load pager and get tasks. */ $this->app->loadClass('pager', $static = true); - $pager = new pager($recTotal, $recPerPage, $pageID); + $pager = new pager(0, $recPerPage, $pageID); $this->view->title = $this->lang->program->PGMStakeholder; $this->view->position[] = $this->lang->program->PGMStakeholder; diff --git a/module/program/view/pgmbrowsebylist.html.php b/module/program/view/pgmbrowsebylist.html.php index d7cf5e6eef..0b94eda414 100644 --- a/module/program/view/pgmbrowsebylist.html.php +++ b/module/program/view/pgmbrowsebylist.html.php @@ -64,7 +64,6 @@ PM);?> type == 'program'):?> - id", $program, 'list', 'persons');?> id", $program, 'list', 'play', '', 'iframe', true);?> id", $program, 'list', 'magic', '', 'iframe', true);?> id", $program, 'list', 'pause', '', 'iframe', true);?> diff --git a/module/qa/control.php b/module/qa/control.php index 59583e2acf..15a11c8c0b 100644 --- a/module/qa/control.php +++ b/module/qa/control.php @@ -19,7 +19,7 @@ class qa extends control */ public function index($locate = 'auto', $productID = 0) { - $this->products = $this->loadModel('product')->getPairs('nocode', $this->session->PRJ); + $this->products = $this->loadModel('product')->getPairs('nocode'); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=qa"))); if($locate == 'yes') $this->locate($this->createLink('bug', 'browse')); diff --git a/module/testcase/control.php b/module/testcase/control.php index 7a2231304e..eccb57be94 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('nocode', $this->session->PRJ); + $this->view->products = $this->products = $this->product->getPairs('nocode'); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase"))); } diff --git a/module/testreport/control.php b/module/testreport/control.php index 90c7184105..1de209c14c 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -525,7 +525,7 @@ class testreport extends control { if($objectType == 'product') { - $this->products = $this->product->getPairs('nocode', $this->session->PRJ); + $this->products = $this->product->getPairs('nocode'); $productID = $this->product->saveState($objectID, $this->products); $this->testreport->setMenu($this->products, $productID); return $productID; diff --git a/module/testsuite/control.php b/module/testsuite/control.php index d8e6027a23..53731db3da 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -41,7 +41,7 @@ class testsuite extends control $this->session->set('testsuiteList', $this->app->getURI(true)); /* Set menu. */ - $this->view->products = $this->products = $this->loadModel('product')->getPairs('nocode', $this->session->PRJ); + $this->view->products = $this->products = $this->loadModel('product')->getPairs('nocode'); $productID = $this->product->saveState($productID, $this->products); $this->testsuite->setMenu($this->products, $productID); diff --git a/module/testtask/control.php b/module/testtask/control.php index 96753609cf..249c989bbe 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -23,7 +23,7 @@ class testtask extends control { parent::__construct($moduleName, $methodName); $this->loadModel('product'); - $this->view->products = $this->products = $this->product->getPairs('nocode', $this->session->PRJ); + $this->view->products = $this->products = $this->product->getPairs('nocode'); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testtask"))); }