[themes] add search link to rating
This commit is contained in:
parent
f7047350b9
commit
1ad6acf37c
3 changed files with 15 additions and 15 deletions
|
@ -53,11 +53,12 @@ class CustomViewPostTheme extends ViewPostTheme
|
|||
}
|
||||
|
||||
if (Extension::is_enabled(RatingsInfo::KEY)) {
|
||||
if ($image['rating'] === null || $image['rating'] == "?") {
|
||||
$image['rating'] = "?";
|
||||
$rating = $image['rating'];
|
||||
if ($rating === null) {
|
||||
$rating = "?";
|
||||
}
|
||||
$h_rating = Ratings::rating_to_human($image['rating']);
|
||||
$html .= "<br>Rating: $h_rating";
|
||||
$h_rating = Ratings::rating_to_human($rating);
|
||||
$html .= "<br>Rating: <a href='".search_link(["rating=$rating"])."'>$h_rating</a>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -54,14 +54,12 @@ class CustomViewPostTheme extends ViewPostTheme
|
|||
}
|
||||
|
||||
if (Extension::is_enabled(RatingsInfo::KEY)) {
|
||||
if ($image['rating'] === null || $image['rating'] == "?") {
|
||||
$image['rating'] = "?";
|
||||
}
|
||||
// @phpstan-ignore-next-line - ???
|
||||
if (Extension::is_enabled(RatingsInfo::KEY)) {
|
||||
$h_rating = Ratings::rating_to_human($image['rating']);
|
||||
$html .= "<br>Rating: $h_rating";
|
||||
$rating = $image['rating'];
|
||||
if ($rating === null) {
|
||||
$rating = "?";
|
||||
}
|
||||
$h_rating = Ratings::rating_to_human($rating);
|
||||
$html .= "<br>Rating: <a href='".search_link(["rating=$rating"])."'>$h_rating</a>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
|
@ -58,11 +58,12 @@ class CustomViewPostTheme extends ViewPostTheme
|
|||
}
|
||||
|
||||
if (Extension::is_enabled(RatingsInfo::KEY)) {
|
||||
if ($image['rating'] === null || $image['rating'] == "?") {
|
||||
$image['rating'] = "?";
|
||||
$rating = $image['rating'];
|
||||
if ($rating === null) {
|
||||
$rating = "?";
|
||||
}
|
||||
$h_rating = Ratings::rating_to_human($image['rating']);
|
||||
$html .= "<br>Rating: $h_rating";
|
||||
$h_rating = Ratings::rating_to_human($rating);
|
||||
$html .= "<br>Rating: <a href='".search_link(["rating=$rating"])."'>$h_rating</a>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
|
|
Reference in a new issue