diff --git a/module/branch/control.php b/module/branch/control.php index 2ddbaa09b3..043a561fb5 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -43,7 +43,7 @@ class branch extends control $this->view->browseType = $browseType; $this->view->orderBy = $orderBy; $this->view->pager = $pager; - $this->view->product = $this->loadModel('product')->getById($productID); + $this->view->product = $this->product->getById($productID); $this->display(); } diff --git a/module/branch/lang/en.php b/module/branch/lang/en.php index 44eb3d7137..1855f28ff7 100644 --- a/module/branch/lang/en.php +++ b/module/branch/lang/en.php @@ -15,7 +15,7 @@ $lang->branch->activate = 'Activate'; $lang->branch->activateAction = 'Activate Branch'; $lang->branch->close = 'Close'; $lang->branch->closeAction = 'Close Branch'; -$lang->branch->create = 'Create Branch'; +$lang->branch->create = 'Create %s'; $lang->branch->merge = 'Merge'; $lang->branch->batchEdit = 'Batch Edit'; $lang->branch->defaultBranch = 'Default Branch'; @@ -43,7 +43,7 @@ $lang->branch->confirmActivate = 'Do you want to activate this @branch@?'; $lang->branch->existName = '@branch@ name already exists.'; $lang->branch->noData = 'No branches.'; -$lang->branch->mainBranch = 'The default main branch of the product.'; +$lang->branch->mainBranch = 'The default main %s of the product.'; $lang->branch->statusList = array(); $lang->branch->statusList['active'] = 'Active'; diff --git a/module/branch/model.php b/module/branch/model.php index 241cc824b0..e2833f45cb 100644 --- a/module/branch/model.php +++ b/module/branch/model.php @@ -55,9 +55,9 @@ class branchModel extends model ->page($pager) ->fetchAll('id'); - $product = $this->loadModel('product')->getById($productID); if($browseType == 'closed') return $branchList; + $product = $this->loadModel('product')->getById($productID); $defaultBranch = BRANCH_MAIN; foreach($branchList as $branch) $defaultBranch = $branch->default ? $branch->id : $defaultBranch;