1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00

Fix help menu links for folks with diviner uninstalled

Summary: move code to uninstallable help app rather than diviner. Fixes T4690.

Test Plan: uninstalled diviner, noted no links, then moved the code and suddenly helpful help links showed up once more.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4690

Differential Revision: https://secure.phabricator.com/D8638
This commit is contained in:
Bob Trahan 2014-03-28 13:41:19 -07:00
parent 87781eca04
commit 44942f3378
2 changed files with 24 additions and 25 deletions

View file

@ -45,29 +45,4 @@ final class PhabricatorApplicationDiviner extends PhabricatorApplication {
);
}
public function buildMainMenuItems(
PhabricatorUser $user,
PhabricatorController $controller = null) {
$items = array();
$application = null;
if ($controller) {
$application = $controller->getCurrentApplication();
}
if ($application && $application->getHelpURI()) {
$item = id(new PHUIListItemView())
->setName(pht('%s Help', $application->getName()))
->addClass('core-menu-item')
->setIcon('info-sm')
->setOrder(200)
->setHref($application->getHelpURI());
$items[] = $item;
}
return $items;
}
}

View file

@ -19,4 +19,28 @@ final class PhabricatorApplicationHelp extends PhabricatorApplication {
);
}
public function buildMainMenuItems(
PhabricatorUser $user,
PhabricatorController $controller = null) {
$items = array();
$application = null;
if ($controller) {
$application = $controller->getCurrentApplication();
}
if ($application && $application->getHelpURI()) {
$item = id(new PHUIListItemView())
->setName(pht('%s Help', $application->getName()))
->addClass('core-menu-item')
->setIcon('info-sm')
->setOrder(200)
->setHref($application->getHelpURI());
$items[] = $item;
}
return $items;
}
}