From fc1db28c9b1b13c5b9e6baf6d24963081f18f017 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 25 Jun 2014 09:29:07 +0200 Subject: Allow for closing package requests This allows Trusted Users to close package requests via the request list. Also, entries are now sorted such that open requests are shown before closed requests. Signed-off-by: Lukas Fleischer --- web/html/pkgbase.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web/html/pkgbase.php') diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index dd09977..9047f5b 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -96,6 +96,8 @@ if (check_token()) { list($ret, $output) = pkgbase_change_category($base_id, $atype); } elseif (current_action("do_FileRequest")) { list($ret, $output) = pkgbase_file_request($ids, $_POST['type'], $_POST['comments']); + } elseif (current_action("do_CloseRequest")) { + list($ret, $output) = pkgbase_close_request($_POST['reqid']); } if (isset($_REQUEST['comment'])) { @@ -105,7 +107,11 @@ if (check_token()) { } if ($ret) { - if (isset($base_id)) { + if (current_action("do_CloseRequest")) { + /* Redirect back to package request page on success. */ + header('Location: ' . get_pkgreq_route()); + exit(); + } if (isset($base_id)) { /* Redirect back to package base page on success. */ header('Location: ' . get_pkgbase_uri($pkgbase_name)); exit(); -- cgit v1.2.3-54-g00ecf