summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_comments.php
diff options
context:
space:
mode:
authorDan Vratil <vratil@progdansoft.com>2010-11-21 08:59:07 +0100
committerLoui Chang <louipc.ist@gmail.com>2010-11-21 09:37:17 +0100
commit57a5cbfd88b2b91722ce0bf6911b416d051dde65 (patch)
treec7a8175ec8c90ef6610aabce02af4d291ea74d14 /web/template/pkg_comments.php
parent01fc2024cb48a68710065ceaae070f35aa69825d (diff)
downloadaur-57a5cbfd88b2b91722ce0bf6911b416d051dde65.tar.gz
aur-57a5cbfd88b2b91722ce0bf6911b416d051dde65.tar.xz
Auto redirect from confirmation screens.
Finally move comment deletion and category editing into functions and remove pkgedit.php Signed-off-by: Loui Chang <louipc.ist@gmail.com> -Fix indentation -Fix variable naming conflict $id vs $cid
Diffstat (limited to 'web/template/pkg_comments.php')
-rw-r--r--web/template/pkg_comments.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 02171a03..e4a9da13 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -3,20 +3,25 @@
$uid = uid_from_sid($SID);
while (list($indx, $carr) = each($comments)) { ?>
<div class="comment-header"><?php
- if (canDeleteCommentArray($carr, $atype, $uid)) {
- $durl = '<a href="pkgedit.php?del_Comment=1';
- $durl.= '&comment_id=' . $carr['ID'] . '&ID=' . $row['ID'];
- $durl.= '"><img src="images/x.png" border="0"';
- $durl.= ' alt="' . __("Delete comment") . '"></a> ';
-
- echo $durl;
- }
if ($SID) {
$carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
}
- echo __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
+ $commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
+
+ if (canDeleteCommentArray($carr, $atype, $uid)) {
+ $durl = '<form method="POST" action="packages.php?ID='.$row['ID'].'">';
+ $durl.= '<input type="hidden" name="action" value="do_DeleteComment">';
+ $durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'">';
+ $durl.= '<input type="image" src="images/x.png" border="0" ';
+ $durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
+ $durl.= ' width="19" height="18">&nbsp;';
+
+ $commentHeader = $durl.$commentHeader."</form>";
+ }
+
+ echo $commentHeader;
?></div>
<blockquote class="comment-body">
<div>