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:
parent
fb361f206c
commit
84d4142b06
1 changed files with 5 additions and 1 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue