Adjusted rating array usage

This commit is contained in:
Matthew Barbour 2019-06-27 19:49:58 -05:00 committed by matthew
parent 5e87dff033
commit b2193cb6f1
2 changed files with 2 additions and 2 deletions

View file

@ -414,7 +414,7 @@ class CommentList extends Extension
$image = Image::by_id($row["image_id"]); $image = Image::by_id($row["image_id"]);
if ( if (
ext_is_live("Ratings") && !is_null($image) && ext_is_live("Ratings") && !is_null($image) &&
strpos($user_ratings, $image->rating) === false !in_array($image->rating, $user_ratings)
) { ) {
$image = null; // this is "clever", I may live to regret it $image = null; // this is "clever", I may live to regret it
} }

View file

@ -74,7 +74,7 @@ class Featured extends Extension
} }
if (!is_null($image)) { if (!is_null($image)) {
if (ext_is_live("Ratings")) { if (ext_is_live("Ratings")) {
if (strpos(Ratings::get_user_class_privs($user), $image->rating) === false) { if (!in_array($image->rating, Ratings::get_user_class_privs($user))) {
return; return;
} }
} }