summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-07-04 10:40:29 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-07-04 11:10:37 +0200
commit8a465182babccec10b8e789dbc871db3beb9bec5 (patch)
tree135ca7f54ec901fc498c77dbfab9486df5080a9b /web/html/index.php
parent61d70c1fa5f0ed9cfe4708a4630fbf959da2d781 (diff)
downloadaurweb-8a465182babccec10b8e789dbc871db3beb9bec5.tar.xz
Allow for selecting a reason when closing a request
When closing a package request, Trusted Users can now pick a reason ("Accepted" or "Rejected"). This allows for marking a request as accepted, even if the corresponding package base has already been deleted. Also, the notification email now always explicitly states whether a request has been accepted or closed in the message body. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/index.php')
-rw-r--r--web/html/index.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/web/html/index.php b/web/html/index.php
index 40063f0..554e86c 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -89,6 +89,25 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
}
include get_route('/' . $tokens[1]);
+} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_pkgreq_route()) {
+ if (!empty($tokens[2])) {
+ /* TODO: Create a proper data structure to pass variables from
+ * the routing framework to the individual pages instead of
+ * initializing arbitrary variables here. */
+ if (!empty($tokens[3]) && $tokens[3] == 'close') {
+ $pkgreq_id = $tokens[2];
+ } else {
+ $pkgreq_id = null;
+ }
+
+ if (!$pkgreq_id) {
+ header("HTTP/1.0 404 Not Found");
+ include "./404.php";
+ return;
+ }
+ }
+
+ include get_route('/' . $tokens[1]);
} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_user_route()) {
if (!empty($tokens[2])) {
$_REQUEST['ID'] = uid_from_username($tokens[2]);