Fixing rating= search
This commit is contained in:
parent
81d44cbb4f
commit
5aa2f823d8
@ -104,7 +104,7 @@ class Ratings extends Extension {
|
|||||||
$set = Ratings::privs_to_sql(Ratings::get_user_privs($user));
|
$set = Ratings::privs_to_sql(Ratings::get_user_privs($user));
|
||||||
$event->add_querylet(new Querylet("rating IN ($set)"));
|
$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 = $matches[1] ? $matches[1] : array($matches[2][0]);
|
||||||
$ratings = array_intersect($ratings, str_split(Ratings::get_user_privs($user)));
|
$ratings = array_intersect($ratings, str_split(Ratings::get_user_privs($user)));
|
||||||
$set = "'" . join("', '", $ratings) . "'";
|
$set = "'" . join("', '", $ratings) . "'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user