* Fix bug#16051.
This commit is contained in:
@@ -27,13 +27,17 @@ class branch extends control
|
||||
{
|
||||
$this->loadModel('product')->setMenu($productID);
|
||||
|
||||
$branchList = $this->branch->getList($productID, $browseType, $orderBy, $pager = null);
|
||||
|
||||
/* Load pager. */
|
||||
$recTotal = count($branchList);
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$branchList = array_chunk($branchList, $pager->recPerPage);
|
||||
|
||||
$this->view->title = $this->lang->branch->manage;
|
||||
$this->view->branchList = $this->branch->getList($productID, $browseType, $orderBy, $pager);
|
||||
$this->view->branchList = empty($branchList) ? $branchList : $branchList[$pageID - 1];
|
||||
$this->view->productID = $productID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
|
||||
@@ -69,7 +69,6 @@ class branchModel extends model
|
||||
$mainBranch->desc = $this->lang->branch->mainBranch;
|
||||
$mainBranch->order = 0;
|
||||
|
||||
if($pager) $pager->recTotal = $pager->recTotal + 1;
|
||||
return array($mainBranch) + $branchList;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->branch->create;?></h2>
|
||||
<h2><?php echo $lang->branch->editAction;?></h2>
|
||||
</div>
|
||||
<form class='main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
|
||||
Reference in New Issue
Block a user