summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-07-18 07:31:57 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-18 08:07:17 +0200
commit9de84d2fd5921e41fe5ae167981421a2dad016fe (patch)
treeef935e038d698a9e0c0c5c76e7d1e9c78b9da2a2
parentbd4a7aa0ffc2c9eeec26b11958c15cecb6e949e5 (diff)
pkg_comments.php: Fix comment deletion links
* Add a missing quote to the "alt" attribute. Regression introduced in d8b2eb4b628e8927b0bed1b254c996520de95b83. * Retrieve and store the package name before overwriting the "$row" variable. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/template/pkg_comments.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 0f7d80c..46c1ef3 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -1,6 +1,7 @@
<?php
$uid = uid_from_sid($SID);
$count = package_comments_count($row['ID']);
+$pkgname = $row['Name'];
?>
<div id="news">
<h3>
@@ -14,12 +15,12 @@ $count = package_comments_count($row['ID']);
endif; ?>
<h4>
<?php if (canDeleteCommentArray($row, $atype, $uid)): ?>
- <form method="post" action="<?php echo htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>">
+ <form method="post" action="<?php echo htmlspecialchars(get_pkg_uri($pkgname), ENT_QUOTES); ?>">
<fieldset style="display:inline;">
<input type="hidden" name="action" value="do_DeleteComment" />
<input type="hidden" name="comment_id" value="<?php echo $row['ID'] ?>" />
<input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
- <input type="image" src="/images/x.png" alt="<?php echo __('Delete comment') ?> name="submit" value="1" />
+ <input type="image" src="/images/x.png" alt="<?php echo __('Delete comment') ?>" name="submit" value="1" />
</fieldset>
</form>
<?php endif; ?>