* code for task #73991.
This commit is contained in:
@@ -792,10 +792,11 @@ class projectModel extends model
|
||||
* @param string $orderBy
|
||||
* @param string $excludedModel
|
||||
* @param string $model
|
||||
* @param bool $onlyMultiple
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getPairsByProgram($programID = '', $status = 'all', $isQueryAll = false, $orderBy = 'order_asc', $excludedModel = '', $model = '')
|
||||
public function getPairsByProgram($programID = '', $status = 'all', $isQueryAll = false, $orderBy = 'order_asc', $excludedModel = '', $model = '', $onlyMultiple = false)
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectPairs();
|
||||
return $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
@@ -806,6 +807,7 @@ class projectModel extends model
|
||||
->beginIF($status != 'all' and $status != 'noclosed')->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($excludedModel)->andWhere('model')->ne($excludedModel)->fi()
|
||||
->beginIF($model)->andWhere('model')->eq($model)->fi()
|
||||
->beginIF($onlyMultiple)->andWhere('multiple')->eq(1)->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