* Fix a bug.
This commit is contained in:
@@ -1367,17 +1367,19 @@ class bugModel extends model
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $limit
|
||||
* @param int $pager
|
||||
* @param object $pager
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $programID = 0)
|
||||
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null, $projectID = 0)
|
||||
{
|
||||
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($programID)->andWhere('PRJ')->eq($programID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi()
|
||||
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('PRJ')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
Reference in New Issue
Block a user