Fixing rating= search
This commit is contained in:
parent
81d44cbb4f
commit
5aa2f823d8
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ class Ratings extends Extension {
|
|||
$set = Ratings::privs_to_sql(Ratings::get_user_privs($user));
|
||||
$event->add_querylet(new Querylet("rating IN ($set)"));
|
||||
}
|
||||
if(preg_match("/^rating=(?:([sqeu]+)|(safe|questionable|explicit|unknown))$", strtolower($event->term), $matches)) {
|
||||
if(preg_match("/^rating=(?:([sqeu]+)|(safe|questionable|explicit|unknown))$/D", strtolower($event->term), $matches)) {
|
||||
$ratings = $matches[1] ? $matches[1] : array($matches[2][0]);
|
||||
$ratings = array_intersect($ratings, str_split(Ratings::get_user_privs($user)));
|
||||
$set = "'" . join("', '", $ratings) . "'";
|
||||
|
|
Reference in a new issue