Merge pull request #12254 from MrPetovan/bug/reorder-search
Reorder search to try redirecting to post first
This commit is contained in:
commit
7c7cb8373c
1 changed files with 18 additions and 18 deletions
|
@ -120,16 +120,15 @@ class Index extends BaseSearch
|
|||
if (strpos($search, '#') === 0) {
|
||||
$tag = true;
|
||||
$search = substr($search, 1);
|
||||
}
|
||||
|
||||
self::tryRedirectToProfile($search);
|
||||
|
||||
} else {
|
||||
if (strpos($search, '@') === 0 || strpos($search, '!') === 0) {
|
||||
return self::performContactSearch($search);
|
||||
}
|
||||
|
||||
self::tryRedirectToPost($search);
|
||||
|
||||
self::tryRedirectToProfile($search);
|
||||
|
||||
if (!empty($_GET['search-option'])) {
|
||||
switch ($_GET['search-option']) {
|
||||
case 'fulltext':
|
||||
|
@ -143,6 +142,7 @@ class Index extends BaseSearch
|
|||
return self::performContactSearch($search, '!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't perform a fulltext or tag search on search results that look like an URL
|
||||
// Tags don't look like an URL and the fulltext search does only work with natural words
|
||||
|
|
Loading…
Reference in a new issue