1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Use new menu contsants in home menu item

Summary: Ref T11957, just lays in some minor bug fixes. Sets correct menu, removes sidebar on edit.

Test Plan: Test /menu/ on home with Admin and Normal accounts.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17247
This commit is contained in:
Chad Little 2017-01-25 09:04:33 -08:00
parent ed38642afc
commit ce09ab9b0e

View file

@ -7,8 +7,10 @@ final class PhabricatorHomeMenuItemController
$viewer = $this->getViewer();
$type = $request->getURIData('type');
$custom_phid = null;
$menu = PhabricatorProfileMenuEngine::MENU_GLOBAL;
if ($type == 'personal') {
$custom_phid = $viewer->getPHID();
$menu = PhabricatorProfileMenuEngine::MENU_PERSONAL;
}
$application = 'PhabricatorHomeApplication';
@ -21,7 +23,9 @@ final class PhabricatorHomeMenuItemController
$engine = id(new PhabricatorHomeProfileMenuEngine())
->setProfileObject($home_app)
->setCustomPHID($custom_phid)
->setController($this);
->setMenuType($menu)
->setController($this)
->setShowNavigation(false);
return $engine->buildResponse();
}