mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
parent
78d6137ee3
commit
a3c4021f12
8 changed files with 26 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue