Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14085433
D17274.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D17274.diff
View Options
diff --git a/src/applications/home/controller/PhabricatorHomeMenuItemController.php b/src/applications/home/controller/PhabricatorHomeMenuItemController.php
--- a/src/applications/home/controller/PhabricatorHomeMenuItemController.php
+++ b/src/applications/home/controller/PhabricatorHomeMenuItemController.php
@@ -14,12 +14,6 @@
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
- if ($viewer->getPHID()) {
- $custom_phid = $viewer->getPHID();
- } else {
- $custom_phid = null;
- }
-
$application = 'PhabricatorHomeApplication';
$home_app = id(new PhabricatorApplicationQuery())
->setViewer($viewer)
@@ -29,7 +23,7 @@
$engine = id(new PhabricatorHomeProfileMenuEngine())
->setProfileObject($home_app)
- ->setCustomPHID($custom_phid)
+ ->setCustomPHID($viewer->getPHID())
->setController($this);
return $engine->buildResponse();
diff --git a/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
--- a/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
+++ b/src/applications/home/menuitem/PhabricatorHomeLauncherProfileMenuItem.php
@@ -49,16 +49,14 @@
PhabricatorProfileMenuItemConfiguration $config) {
$viewer = $this->getViewer();
- if ($viewer->isLoggedIn()) {
- $name = $this->getDisplayName($config);
- $icon = 'fa-globe';
- $href = '/applications/';
+ $name = $this->getDisplayName($config);
+ $icon = 'fa-globe';
+ $href = '/applications/';
- $item = $this->newItem()
- ->setHref($href)
- ->setName($name)
- ->setIcon($icon);
- }
+ $item = $this->newItem()
+ ->setHref($href)
+ ->setName($name)
+ ->setIcon($icon);
return array(
$item,
diff --git a/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php
--- a/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php
+++ b/src/applications/home/menuitem/PhabricatorHomeProfileMenuItem.php
@@ -56,17 +56,19 @@
PhabricatorProfileMenuItemConfiguration $config) {
$viewer = $this->getViewer();
- if ($viewer->isLoggedIn()) {
- $name = $this->getDisplayName($config);
- $icon = 'fa-home';
- $href = $this->getItemViewURI($config);
-
- $item = $this->newItem()
- ->setHref($href)
- ->setName($name)
- ->setIcon($icon);
+ if (!$viewer->isLoggedIn()) {
+ return array();
}
+ $name = $this->getDisplayName($config);
+ $icon = 'fa-home';
+ $href = $this->getItemViewURI($config);
+
+ $item = $this->newItem()
+ ->setHref($href)
+ ->setName($name)
+ ->setIcon($icon);
+
return array(
$item,
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 11:58 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6780509
Default Alt Text
D17274.diff (2 KB)
Attached To
Mode
D17274: Fix a couple of home menu issues for logged-out viewers
Attached
Detach File
Event Timeline
Log In to Comment