*Optimize the code.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user