summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-07-23 11:14:40 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-07-23 11:14:40 +0200
commit68abf41b940c9b9c850005d6023ba76f3d28f7ac (patch)
tree675c3f1d6e113726d682a6d6473e9817bb6ba97c /web
parent088aab44ea89bd68074e8ac783e0e7d58ff8d40f (diff)
downloadaur-68abf41b940c9b9c850005d6023ba76f3d28f7ac.tar.gz
aur-68abf41b940c9b9c850005d6023ba76f3d28f7ac.tar.xz
Display correct comment count on package base page
Show the correct number of package base comments in the tool tip message of the "Latest Comments" link. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/template/pkg_comments.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index d687cde4..9961554e 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -1,5 +1,11 @@
<?php
-$base_id = pkgbase_from_pkgid($row['ID']);
+if (isset($row['BaseID'])) {
+ /* On a package details page. */
+ $base_id = $row['BaseID'];
+} else {
+ /* On a package base details page. */
+ $base_id = $row['ID'];
+}
$count = pkgbase_comments_count($base_id);
?>
<div id="news">