From bd85441cf66b39d887f01654913da58ef313d14c Mon Sep 17 00:00:00 2001 From: Marcel Korpel Date: Tue, 19 Jan 2016 14:49:50 +0100 Subject: Add comment undeletion functionality Only Developers and Trusted Users can undelete comments. Signed-off-by: Marcel Korpel Signed-off-by: Lukas Fleischer --- web/html/pkgbase.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web/html/pkgbase.php') diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 45b8084..11fdf74 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")) { -- cgit v1.2.3-54-g00ecf