summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_comments.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-03-22 09:38:18 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2012-03-24 10:34:35 +0100
commitcf2f66751238a5c956c69d3852df74c8e9bbbe52 (patch)
treeb50d764d9cfd11c1d4e0ef1b14e92807320cc57f /web/template/pkg_comments.php
parent132856a9383776d7e7788620df656db9fbd9883a (diff)
downloadaur-cf2f66751238a5c956c69d3852df74c8e9bbbe52.tar.gz
aur-cf2f66751238a5c956c69d3852df74c8e9bbbe52.tar.xz
Support canonical links to packages
This is more user-friendly than supporting package IDs only and can be used as a basis to support direct links to AUR packages in places where links are computer-produced (e.g. Wiki templates). Addresses FS#21600 and FS#28839. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_comments.php')
-rw-r--r--web/template/pkg_comments.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index aed9ca8b..ac6e1de9 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -36,7 +36,7 @@ while (list($indx, $carr) = each($comments)) { ?>
</div>
<?php
-$count = package_comments_count($_GET['ID']);
+$count = package_comments_count(isset($_GET['ID']) ? $_GET['ID'] : pkgid_from_name($_GET['N']));
if ($count > 10 && !isset($_GET['comments'])) {
echo '<div class="pgbox">';
echo '<a href="'. $_SERVER['REQUEST_URI'] . '&comments=all">'. __('Show all %s comments', $count) . '</a>';