mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Fix dashboard list if there are no results
Summary: We'll fire a bad query if there are no dashboards in the result list, see: http://pastie.org/private/j0f8tzbdahwragxjsk8qxq Test Plan: Viewed result list with no dashboards. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10207
This commit is contained in:
parent
0e98e33b33
commit
c0919be0ec
1 changed files with 12 additions and 7 deletions
|
@ -55,13 +55,18 @@ final class PhabricatorDashboardSearchEngine
|
|||
|
||||
$dashboards = mpull($dashboards, null, 'getPHID');
|
||||
$viewer = $this->requireViewer();
|
||||
$installs = id(new PhabricatorDashboardInstall())
|
||||
->loadAllWhere(
|
||||
'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)',
|
||||
array(PhabricatorHomeApplication::DASHBOARD_DEFAULT,
|
||||
$viewer->getPHID()),
|
||||
array_keys($dashboards));
|
||||
$installs = mpull($installs, null, 'getDashboardPHID');
|
||||
|
||||
if ($dashboards) {
|
||||
$installs = id(new PhabricatorDashboardInstall())
|
||||
->loadAllWhere(
|
||||
'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)',
|
||||
array(PhabricatorHomeApplication::DASHBOARD_DEFAULT,
|
||||
$viewer->getPHID()),
|
||||
array_keys($dashboards));
|
||||
$installs = mpull($installs, null, 'getDashboardPHID');
|
||||
} else {
|
||||
$installs = array();
|
||||
}
|
||||
|
||||
$list = new PHUIObjectItemListView();
|
||||
$list->setUser($viewer);
|
||||
|
|
Loading…
Reference in a new issue