diff --git a/ext/comment/main.php b/ext/comment/main.php index ad2e9507..fb35da18 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -414,7 +414,7 @@ class CommentList extends Extension $image = Image::by_id($row["image_id"]); if ( 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 } diff --git a/ext/featured/main.php b/ext/featured/main.php index eac762a5..5b7a4845 100644 --- a/ext/featured/main.php +++ b/ext/featured/main.php @@ -74,7 +74,7 @@ class Featured extends Extension } if (!is_null($image)) { 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; } }