Added special:fav search aliases
It displays favorites of user currently logged in.
This commit is contained in:
parent
fa251e60b6
commit
426e104bbe
1 changed files with 6 additions and 1 deletions
|
@ -145,7 +145,12 @@ class PostSearchParser extends AbstractSearchParser
|
|||
{
|
||||
$context = \Chibi\Registry::getContext();
|
||||
$value = strtolower($value);
|
||||
if (in_array($value, ['like', 'liked', 'likes']))
|
||||
if (in_array($value, ['fav', 'favs', 'favd', 'favorite', 'favorites']))
|
||||
{
|
||||
return $this->prepareCriterionForComplexToken('fav', $context->user->name);
|
||||
}
|
||||
|
||||
elseif (in_array($value, ['like', 'liked', 'likes']))
|
||||
{
|
||||
if (!$this->statement->isTableJoined('post_score'))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue