summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-09-18 13:36:34 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-18 14:13:26 +0200
commitc318a50435a5697418ac2b55de698e2f6a057192 (patch)
treebb5305a6d6b3671ab1d34c5f82616c362b938f1a /web
parent2e552cbcad8f4abd64041c793851b7420dd5361c (diff)
downloadaur-c318a50435a5697418ac2b55de698e2f6a057192.tar.gz
aur-c318a50435a5697418ac2b55de698e2f6a057192.tar.xz
pkg_comments.php: Fix "Latest Comments" link
Avoid adding "?comments=all" more than once if the "Latest Comments" link is clicked multiple times. Reported-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/template/pkg_comments.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index d0bd4f88..b0aada20 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -5,7 +5,7 @@ $pkgname = $row['Name'];
?>
<div id="news">
<h3>
- <a href="<?php echo htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>?comments=all" title="<?php echo __('View all %s comments' , $count) ?>"><?php echo __('Latest Comments') ?></a>
+ <a href="<?php echo htmlentities(get_pkg_uri($pkgname), ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?php echo __('View all %s comments' , $count) ?>"><?php echo __('Latest Comments') ?></a>
<span class="arrow"></span>
</h3>
@@ -38,7 +38,7 @@ $pkgname = $row['Name'];
<?php if ($count > 10 && !isset($_GET['comments'])): ?>
<div id="news">
<h3>
- <a href="<?php echo $_SERVER['REQUEST_URI'] ?>&amp;comments=all" title="<?php echo __('View all %s comments', $count) ?>"><?php echo __('All comments', $count) ?></a>
+ <a href="<?php echo htmlentities(get_pkg_uri($pkgname), ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title="<?php echo __('View all %s comments', $count) ?>"><?php echo __('All comments', $count) ?></a>
</h3>
</div>
<?php endif; ?>