diff --git a/data/help.md b/data/help.md index 80a1d8b8..c0ff3a65 100644 --- a/data/help.md +++ b/data/help.md @@ -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` | diff --git a/src/Access.php b/src/Access.php index 71c6e1c6..58ea763c 100644 --- a/src/Access.php +++ b/src/Access.php @@ -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])) diff --git a/src/Models/SearchParsers/PostSearchParser.php b/src/Models/SearchParsers/PostSearchParser.php index 1606323e..26574fb9 100644 --- a/src/Models/SearchParsers/PostSearchParser.php +++ b/src/Models/SearchParsers/PostSearchParser.php @@ -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;