Differential D20407 Diff 48714 src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function newPageContent( | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $dashboard_phid = $this->getDashboardPHID($config); | $dashboard_phid = $this->getDashboardPHID($config); | ||||
| // Reload the dashboard to attach panels, which we need for rendering. | // Reload the dashboard to attach panels, which we need for rendering. | ||||
| $dashboard = id(new PhabricatorDashboardQuery()) | $dashboard = id(new PhabricatorDashboardQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withPHIDs(array($dashboard_phid)) | ->withPHIDs(array($dashboard_phid)) | ||||
| ->needPanels(true) | |||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$dashboard) { | if (!$dashboard) { | ||||
| return $this->newEmptyView( | return $this->newEmptyView( | ||||
| pht('Invalid Dashboard'), | pht('Invalid Dashboard'), | ||||
| pht('This dashboard is invalid and could not be loaded.')); | pht('This dashboard is invalid and could not be loaded.')); | ||||
| } | } | ||||
| if ($dashboard->isArchived()) { | if ($dashboard->isArchived()) { | ||||
| ▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines | |||||