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:
		@@ -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':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user