From 160c0fbcaaa7ae965b7d106de1b7b5df9140d2f3 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 11 May 2022 08:13:06 +0000 Subject: [PATCH] * Fix bug #53656. --- module/product/control.php | 8 ++++++-- module/product/view/all.html.php | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index e6d17166e3..eea2e15688 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1197,7 +1197,7 @@ class product extends control * @access public * @return void */ - public function all($browseType = 'noclosed', $orderBy = 'order_asc', $param = 0) + public function all($browseType = 'noclosed', $orderBy = 'order_asc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load module and set session. */ $this->loadModel('program'); @@ -1211,8 +1211,11 @@ class product extends control $this->product->setMenu($productID); } + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage, $pageID); + /* Process product structure. */ - $productStats = $this->product->getStats($orderBy, '', $browseType, '', 'story', '', $queryID); + $productStats = $this->product->getStats($orderBy, $pager, $browseType, '', 'story', '', $queryID); $productStructure = $this->product->statisticProgram($productStats); $actionURL = $this->createLink('product', 'all', "browseType=bySearch&orderBy=order_asc&queryID=myQueryID"); @@ -1226,6 +1229,7 @@ class product extends control $this->view->productStructure = $productStructure; $this->view->orderBy = $orderBy; $this->view->browseType = $browseType; + $this->view->pager = $pager; $this->display(); } diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 83b96d0c5c..f3df14cae4 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -222,17 +222,18 @@ - -