diff --git a/module/bug/control.php b/module/bug/control.php index e43f9fc73a..a797e9e4b1 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -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); diff --git a/module/project/model.php b/module/project/model.php index 4a5d677861..921c17f69e 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -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]))