[aur-dev] [PATCH 4/5] pkg_comments.php: Fix comment deletion links

Lukas Fleischer archlinux at cryptocrack.de
Wed Jul 18 02:09:31 EDT 2012


* 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 at cryptocrack.de>
---
 web/template/pkg_comments.php | 5 +++--
 1 file 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; ?>
-- 
1.7.11.2



More information about the aur-dev mailing list