diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index 6cca40a9..31c553e9 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -38,9 +38,12 @@ class CustomViewImageTheme extends ViewImageTheme { $html .= "
Source: link"; } - if(!is_null($image->rating)) { - $h_rating = Ratings::rating_to_human($image->rating); - $html .= "
Rating: $h_rating"; + if(!is_null($image->rating) && file_exists("ext/rating")) { + if($image->rating == null || $image->rating == "u"){ + $image->rating = "u"; + } + $h_rating = Ratings::rating_to_human($image->rating); + $html .= "
Rating: $h_rating"; } return $html; diff --git a/themes/lite/view.theme.php b/themes/lite/view.theme.php index 7a8e37ba..70fd4583 100644 --- a/themes/lite/view.theme.php +++ b/themes/lite/view.theme.php @@ -44,9 +44,12 @@ class CustomViewImageTheme extends ViewImageTheme { $html .= "
Source: link"; } - if(!is_null($image->rating)) { - $h_rating = Ratings::rating_to_human($image->rating); - $html .= "
Rating: $h_rating"; + if(!is_null($image->rating) && file_exists("ext/rating")) { + if($image->rating == null || $image->rating == "u"){ + $image->rating = "u"; + } + $h_rating = Ratings::rating_to_human($image->rating); + $html .= "
Rating: $h_rating"; } return $html;