diff options
author | Marcel Korpel <marcel.korpel@gmail.com> | 2016-01-19 14:49:50 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-01-23 11:50:03 +0100 |
commit | bd85441cf66b39d887f01654913da58ef313d14c (patch) | |
tree | 54de0489a7031b061ce4e70bb9b0f25575caf4ec /web/html/pkgbase.php | |
parent | e9fe1a9eb100b11fda80f05b5b3239ee97e3a905 (diff) | |
download | aur-bd85441cf66b39d887f01654913da58ef313d14c.tar.gz aur-bd85441cf66b39d887f01654913da58ef313d14c.tar.xz |
Add comment undeletion functionality
Only Developers and Trusted Users can undelete comments.
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html/pkgbase.php')
-rw-r--r-- | web/html/pkgbase.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 45b8084b..11fdf74a 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -99,6 +99,11 @@ if (check_token()) { list($ret, $output) = pkgbase_notify($ids, false); } elseif (current_action("do_DeleteComment")) { list($ret, $output) = pkgbase_delete_comment(); + } elseif (current_action("do_UndeleteComment")) { + list($ret, $output) = pkgbase_delete_comment(true); + if ($ret && isset($_POST["comment_id"])) { + $fragment = '#comment-' . intval($_POST["comment_id"]); + } } elseif (current_action("do_PinComment")) { list($ret, $output) = pkgbase_pin_comment(); } elseif (current_action("do_UnpinComment")) { |