diff --git a/module/product/control.php b/module/product/control.php index 08fe655607..5427438fee 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1291,7 +1291,7 @@ class product extends control $this->view->position[] = $this->lang->product->line; $this->view->programs = array('') + $this->loadModel('program')->getTopPairs(); - $this->view->lines = $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->orderBy('`order`')->fetchAll(); + $this->view->lines = $this->product->getLines(); $this->display(); } diff --git a/module/product/model.php b/module/product/model.php index c894a61992..1742b3e17b 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1786,7 +1786,7 @@ class productModel extends model * * @param int $programID * @access public - * @return void + * @return array */ public function getLinePairs($programID = 0) { @@ -1797,6 +1797,16 @@ class productModel extends model ->fetchPairs(); } + /* + * Get all lines. + * @access public + * @return array + */ + public function getLines() + { + return $this->dao->select('*')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->orderBy('`order`')->fetchAll(); + } + /** * Get the summary of product's stories. *