Issue 8514: Make paging for searcg items work again

Fixes #8514
This commit is contained in:
Michael 2020-05-17 13:51:56 +00:00
parent 78d6137ee3
commit a3c4021f12
8 changed files with 26 additions and 6 deletions

View file

@ -311,4 +311,19 @@ class Search
{
return DI::config()->get('system', 'directory', self::DEFAULT_DIRECTORY);
}
/**
* Return the search path (either fulltext search or tag search)
*
* @param string $search
* @return string search path
*/
public static function getSearchPath(string $search)
{
if (substr($search, 0, 1) == '#') {
return 'search?tag=' . urlencode(substr($search, 1));
} else {
return 'search?q=' . urlencode($search);
}
}
}