Merge branch 'sprint/app10'
This commit is contained in:
@@ -958,10 +958,11 @@ class productModel extends model
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $involved
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0)
|
||||
public function getProjectListByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0, $orderBy = 'order_desc')
|
||||
{
|
||||
$projectList = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -978,6 +979,7 @@ class productModel extends model
|
||||
->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('id');
|
||||
|
||||
/* Determine how to display the name of the program. */
|
||||
@@ -998,12 +1000,13 @@ class productModel extends model
|
||||
* @param string $browseType
|
||||
* @param int $branch
|
||||
* @param int $involved
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0)
|
||||
public function getProjectStatsByProduct($productID, $browseType = 'all', $branch = 0, $involved = 0, $orderBy = 'order_desc')
|
||||
{
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $involved);
|
||||
$projects = $this->getProjectListByProduct($productID, $browseType, $branch, $involved, $orderBy);
|
||||
if(empty($projects)) return array();
|
||||
|
||||
$projectKeys = array_keys($projects);
|
||||
|
||||
Reference in New Issue
Block a user