* finish task #5297.
This commit is contained in:
@@ -173,12 +173,18 @@ class treeModel extends model
|
||||
/**
|
||||
* Get line pairs.
|
||||
*
|
||||
* @param bool $useShort
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLinePairs()
|
||||
public function getLinePairs($useShort = false)
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
$lines = $this->dao->select('id,name,short')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('deleted')->eq(0)->fetchAll('id');
|
||||
|
||||
$linePairs = array();
|
||||
foreach($lines as $lineID => $line) $linePairs[$lineID] = ($useShort and !empty($line->short)) ? $line->short : $line->name;
|
||||
|
||||
return $linePairs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user