diff --git a/engine/impl/Library.php b/engine/impl/Library.php index 72505aca..7c363d7b 100644 --- a/engine/impl/Library.php +++ b/engine/impl/Library.php @@ -426,6 +426,9 @@ public function linkReviews(&$albums, $loggedIn = false, $includeBody = false) { } } + if(count($tags) == 0) + return; + $ib = $includeBody?"":"null"; $query = "SELECT tag, a.airname, realname, r.id, r.created, r.private, " . "$ib review FROM reviews r " . @@ -468,6 +471,10 @@ public function markAlbumsReviewed(&$albums, $loggedIn = 0) { $tags[$tag] = $i; } } + + if(count($tags) == 0) + return; + $query = "SELECT tag, a.airname, realname FROM reviews r " . "LEFT JOIN users u ON r.user = u.name " . "LEFT JOIN airnames a ON r.airname = a.id WHERE " . @@ -515,6 +522,9 @@ public function markAlbumsPlayable(&$albums) { } } + if(count($tags) == 0) + return; + $urlFilter = $enableExternalLinks ? "url <> ''" : "url RLIKE ?"; $query = "SELECT tag FROM tracknames ".