* fix bug #30094.
This commit is contained in:
@@ -54,12 +54,11 @@ class releaseModel extends model
|
||||
*/
|
||||
public function getList($productID, $branch = 'all', $type = 'all', $orderBy = 't1.date_desc', $pager = null)
|
||||
{
|
||||
$releases = $this->dao->select('t1.*, t2.name as productName')
|
||||
->from(TABLE_RELEASE)->alias('t1')
|
||||
$releases = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_RELEASE)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($branch !== 'all')->andWhere('t1.branch')->like(",{$branch},")->fi()
|
||||
->beginIF($branch !== 'all')->andWhere("FIND_IN_SET($branch, t1.branch)")->fi()
|
||||
->beginIF($type != 'all' && $type != 'review')->andWhere('t1.status')->eq($type)->fi()
|
||||
->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
Reference in New Issue
Block a user