ratings works with sqlite (unit tests pass, at least)
This commit is contained in:
@ -225,16 +225,16 @@ class Ratings extends Extension
|
||||
{
|
||||
global $user;
|
||||
|
||||
if (is_null($event->term)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$matches = [];
|
||||
if (is_null($event->term) && $this->no_rating_query($event->context)) {
|
||||
$set = Ratings::privs_to_sql(Ratings::get_user_default_ratings($user));
|
||||
$event->add_querylet(new Querylet("rating IN ($set)"));
|
||||
}
|
||||
|
||||
if (is_null($event->term)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (preg_match($this->search_regexp, strtolower($event->term), $matches)) {
|
||||
$ratings = $matches[1] ? $matches[1] : $matches[2][0];
|
||||
|
||||
@ -420,7 +420,6 @@ class Ratings extends Extension
|
||||
return $ratings;
|
||||
}
|
||||
|
||||
|
||||
public static function get_user_class_privs(User $user): array
|
||||
{
|
||||
global $config;
|
||||
|
Reference in New Issue
Block a user