Changed post type aliases in post search
This commit is contained in:
parent
dcd2c8aa06
commit
6ce47ec2a7
3 changed files with 5 additions and 6 deletions
|
@ -39,8 +39,8 @@ Command | Description
|
|||
[search]id:1,2,3[/search] | having specific post ID | `ids` |
|
||||
[search]idmin:5[/search] | posts with ID greater than or equal to @5 | `id_min` |
|
||||
[search]idmax:5[/search] | posts with ID less than or equal to @5 | `id_max` |
|
||||
[search]type:img[/search] | only image posts | - |
|
||||
[search]type:swf[/search] | only Flash posts | - |
|
||||
[search]type:img[/search] | only image posts | `type:image` |
|
||||
[search]type:flash[/search] | only Flash posts | `type:swf` |
|
||||
[search]type:yt[/search] | only Youtube posts | `type:youtube` |
|
||||
[search]special:liked[/search] | posts liked by currently logged in user | `special:likes`, `special:like` |
|
||||
[search]special:disliked[/search] | posts disliked by currently logged in user | `special:dislikes`, `special:dislike` |
|
||||
|
|
|
@ -55,7 +55,6 @@ class Access
|
|||
TextCaseConverter::CAMEL_CASE,
|
||||
TextCaseConverter::SPINAL_CASE);
|
||||
|
||||
|
||||
if (isset(self::$privileges[$key]))
|
||||
$minAccessRank = self::$privileges[$key];
|
||||
elseif (isset(self::$privileges[$key2]))
|
||||
|
|
|
@ -195,11 +195,11 @@ class PostSearchParser extends AbstractSearchParser
|
|||
elseif ($key == 'type')
|
||||
{
|
||||
$value = strtolower($value);
|
||||
if ($value == 'swf')
|
||||
if (in_array($value, ['swf', 'flash']))
|
||||
$type = PostType::Flash;
|
||||
elseif ($value == 'img')
|
||||
elseif (in_array($value, ['img', 'image']))
|
||||
$type = PostType::Image;
|
||||
elseif ($value == 'video' or in_array($value, ['mp4', 'webm', 'ogg', '3gp', 'ogg']))
|
||||
elseif ($value == 'video')
|
||||
$type = PostType::Video;
|
||||
elseif ($value == 'yt' or $value == 'youtube')
|
||||
$type = PostType::Youtube;
|
||||
|
|
Loading…
Reference in a new issue