1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-21 19:19:12 +01:00

Search - fix external redirect issue for "help" search

Summary: Fixes T7335. "help" gets you to a specific diviner doc which is an external link, so make sure the code sets is external for the redirect response in this case.

Test Plan: typed "help" and got some

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7335

Differential Revision: https://secure.phabricator.com/D11830
This commit is contained in:
Bob Trahan 2015-02-19 16:23:01 -08:00
parent fb361f206c
commit 84d4142b06

View file

@ -7,7 +7,7 @@ final class PhabricatorJumpNavHandler {
$help_href = PhabricatorEnv::getDocLink('Jump Nav User Guide');
$patterns = array(
'/^help/i' => 'uri:'.$help_href,
'/^help/i' => 'exturi:'.$help_href,
'/^a$/i' => 'uri:/audit/',
'/^f$/i' => 'uri:/feed/',
'/^d$/i' => 'uri:/differential/',
@ -28,6 +28,10 @@ final class PhabricatorJumpNavHandler {
if (!strncmp($effect, 'uri:', 4)) {
return id(new AphrontRedirectResponse())
->setURI(substr($effect, 4));
} else if (!strncmp($effect, 'exturi:', 7)) {
return id(new AphrontRedirectResponse())
->setURI(substr($effect, 7))
->setIsExternal(true);
} else {
switch ($effect) {
case 'user':