From 48cc8207bf88beaaedd21ef271b1d012f3e18686 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 19 Jun 2014 14:00:12 +0200 Subject: Add support for filing package requests Add a new entry to the package actions box that allows for filing deletion and orphan requests. When choosing that action, the user is redirected to a new page that allows for selecting a request type and entering a comment. When submitting the request, a new entry in the request database is created and an email is sent to a configurable mailing list (defaults to aur-general). Signed-off-by: Lukas Fleischer --- web/html/index.php | 3 +++ web/html/pkgbase.php | 2 ++ web/html/pkgreq.php | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 web/html/pkgreq.php (limited to 'web/html') diff --git a/web/html/index.php b/web/html/index.php index 921839a8..40063f08 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -75,6 +75,9 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { $_GET['N'] = $tokens[2]; include('voters.php'); return; + case "request": + include('pkgreq.php'); + return; default: header("HTTP/1.0 404 Not Found"); include "./404.php"; diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 0d1b74aa..dd099774 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -94,6 +94,8 @@ if (check_token()) { list($ret, $output) = pkgbase_delete_comment($atype); } elseif (current_action("do_ChangeCategory")) { 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']); } if (isset($_REQUEST['comment'])) { diff --git a/web/html/pkgreq.php b/web/html/pkgreq.php new file mode 100644 index 00000000..c8dd6736 --- /dev/null +++ b/web/html/pkgreq.php @@ -0,0 +1,55 @@ + + +
+

+

+ ', htmlspecialchars($pkgbase_name), ''); ?> +

+
    + +
  • + +
+
+
+ + + +

+ + +

+

+ + +

+

+ " /> +

+
+
+
+ +