* add empty mode for getPairs method of project model.
This commit is contained in:
@@ -88,7 +88,7 @@ class bug extends control
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Get projects. */
|
||||
$projects = $this->loadModel('project')->getPairs() + array('0' => '');
|
||||
$projects = $this->loadModel('project')->getPairs('empty');
|
||||
|
||||
/* Get bugs. */
|
||||
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
|
||||
|
||||
@@ -522,6 +522,7 @@ class projectModel extends model
|
||||
if(strpos($mode, 'noclosed') !== false and $project->status == 'done') continue;
|
||||
if($this->checkPriv($project)) $pairs[$project->id] = $project->name;
|
||||
}
|
||||
if(strpos($mode, 'empty') !== false) $pairs[0] = '';
|
||||
|
||||
/* If the pairs is empty, to make sure there's an project in the pairs. */
|
||||
if(empty($pairs) and isset($projects[0]) and $this->checkPriv($projects[0]))
|
||||
|
||||
Reference in New Issue
Block a user