mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +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');
|
$dashboards = mpull($dashboards, null, 'getPHID');
|
||||||
$viewer = $this->requireViewer();
|
$viewer = $this->requireViewer();
|
||||||
$installs = id(new PhabricatorDashboardInstall())
|
|
||||||
->loadAllWhere(
|
if ($dashboards) {
|
||||||
'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)',
|
$installs = id(new PhabricatorDashboardInstall())
|
||||||
array(PhabricatorHomeApplication::DASHBOARD_DEFAULT,
|
->loadAllWhere(
|
||||||
$viewer->getPHID()),
|
'objectPHID IN (%Ls) AND dashboardPHID IN (%Ls)',
|
||||||
array_keys($dashboards));
|
array(PhabricatorHomeApplication::DASHBOARD_DEFAULT,
|
||||||
$installs = mpull($installs, null, 'getDashboardPHID');
|
$viewer->getPHID()),
|
||||||
|
array_keys($dashboards));
|
||||||
|
$installs = mpull($installs, null, 'getDashboardPHID');
|
||||||
|
} else {
|
||||||
|
$installs = array();
|
||||||
|
}
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
$list->setUser($viewer);
|
$list->setUser($viewer);
|
||||||
|
|
Loading…
Reference in a new issue