* Fix bug#18983.
This commit is contained in:
@@ -1147,7 +1147,7 @@ class kanban extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$projects += $this->loadModel('project')->getPairsByProgram();
|
||||
$projects += $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
|
||||
$builds2Imported = $this->build->getProjectBuilds($selectedProjectID, 'all', 0, 't1.date_desc,t1.id_desc', $pager);
|
||||
}
|
||||
|
||||
|
||||
@@ -480,10 +480,11 @@ class projectModel extends model
|
||||
* @param status $status all|wait|doing|suspended|closed|noclosed
|
||||
* @param bool $isQueryAll
|
||||
* @param string $orderBy
|
||||
* @param string $excludedModel
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getPairsByProgram($programID = '', $status = 'all', $isQueryAll = false, $orderBy = 'order_asc')
|
||||
public function getPairsByProgram($programID = '', $status = 'all', $isQueryAll = false, $orderBy = 'order_asc', $excludedModel = '')
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectPairs();
|
||||
return $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
@@ -491,6 +492,7 @@ class projectModel extends model
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($programID !== '')->andWhere('parent')->eq($programID)->fi()
|
||||
->beginIF($status != 'all' && $status != 'noclosed')->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi()
|
||||
->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF(!$this->app->user->admin and !$isQueryAll)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
Reference in New Issue
Block a user