mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
61d70c1fa5
commit
8a465182ba
7 changed files with 80 additions and 22 deletions
|
@ -88,6 +88,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])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue