Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14081237
D18661.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18661.diff
View Options
diff --git a/src/applications/search/engine/PhabricatorJumpNavHandler.php b/src/applications/search/engine/PhabricatorJumpNavHandler.php
--- a/src/applications/search/engine/PhabricatorJumpNavHandler.php
+++ b/src/applications/search/engine/PhabricatorJumpNavHandler.php
@@ -50,17 +50,35 @@
return id(new AphrontRedirectResponse())
->setURI("/diffusion/symbol/$symbol/?jump=true$context");
case 'find-repository':
- $name = $matches[1];
+ $raw_query = $matches[1];
+
+ $engine = id(new PhabricatorRepository())
+ ->newFerretEngine();
+
+ $compiler = id(new PhutilSearchQueryCompiler())
+ ->setEnableFunctions(true);
+
+ $raw_tokens = $compiler->newTokens($raw_query);
+
+ $fulltext_tokens = array();
+ foreach ($raw_tokens as $raw_token) {
+ $fulltext_token = id(new PhabricatorFulltextToken())
+ ->setToken($raw_token);
+ $fulltext_tokens[] = $fulltext_token;
+ }
+
$repositories = id(new PhabricatorRepositoryQuery())
->setViewer($viewer)
- ->withNameContains($name)
+ ->withFerretConstraint($engine, $fulltext_tokens)
->execute();
if (count($repositories) == 1) {
// Just one match, jump to repository.
$uri = head($repositories)->getURI();
} else {
// More than one match, jump to search.
- $uri = urisprintf('/diffusion/?order=name&name=%s', $name);
+ $uri = urisprintf(
+ '/diffusion/?order=name&query=%s',
+ $raw_query);
}
return id(new AphrontRedirectResponse())->setURI($uri);
default:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 6:53 PM (18 h, 59 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6779298
Default Alt Text
D18661.diff (1 KB)
Attached To
Mode
D18661: Fix fatal when searching for "r matey prepare to be boarded"
Attached
Detach File
Event Timeline
Log In to Comment