mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
2e552cbcad
commit
c318a50435
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ $pkgname = $row['Name'];
|
||||||
?>
|
?>
|
||||||
<div id="news">
|
<div id="news">
|
||||||
<h3>
|
<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>
|
<span class="arrow"></span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ $pkgname = $row['Name'];
|
||||||
<?php if ($count > 10 && !isset($_GET['comments'])): ?>
|
<?php if ($count > 10 && !isset($_GET['comments'])): ?>
|
||||||
<div id="news">
|
<div id="news">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="<?php echo $_SERVER['REQUEST_URI'] ?>&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>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue