Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15429437
D17219.id41416.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17219.id41416.diff
View Options
diff --git a/src/applications/favorites/application/PhabricatorFavoritesApplication.php b/src/applications/favorites/application/PhabricatorFavoritesApplication.php
--- a/src/applications/favorites/application/PhabricatorFavoritesApplication.php
+++ b/src/applications/favorites/application/PhabricatorFavoritesApplication.php
@@ -36,6 +36,11 @@
PhabricatorUser $viewer,
PhabricatorController $controller = null) {
+ $dropdown = $this->renderFavoritesDropdown($viewer);
+ if (!$dropdown) {
+ return null;
+ }
+
return id(new PHUIButtonView())
->setTag('a')
->setHref('#')
@@ -43,17 +48,21 @@
->addClass('phabricator-core-user-menu')
->setNoCSS(true)
->setDropdown(true)
- ->setDropdownMenu($this->renderFavoritesDropdown($viewer));
+ ->setDropdownMenu($dropdown);
}
private function renderFavoritesDropdown(PhabricatorUser $viewer) {
-
$application = __CLASS__;
- $favorites = id(new PhabricatorApplicationQuery())
+
+ $applications = id(new PhabricatorApplicationQuery())
->setViewer($viewer)
->withClasses(array($application))
->withInstalled(true)
- ->executeOne();
+ ->execute();
+ $favorites = head($applications);
+ if (!$favorites) {
+ return null;
+ }
$menu_engine = id(new PhabricatorFavoritesProfileMenuEngine())
->setViewer($viewer)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 2:16 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7682743
Default Alt Text
D17219.id41416.diff (1 KB)
Attached To
Mode
D17219: When Favorites is uninstalled or not visible to the viewer, hide the menu
Attached
Detach File
Event Timeline
Log In to Comment