summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
Diffstat (limited to 'web/html')
-rw-r--r--web/html/index.php19
-rw-r--r--web/html/pkgbase.php2
-rw-r--r--web/html/pkgreq.php12
3 files changed, 28 insertions, 5 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]);
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 5e27e4e..6202180 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -105,7 +105,7 @@ if (check_token()) {
$ret = false;
}
} elseif (current_action("do_CloseRequest")) {
- list($ret, $output) = pkgreq_close($_POST['reqid'], false);
+ list($ret, $output) = pkgreq_close($_POST['reqid'], $_POST['reason']);
}
if (isset($_REQUEST['comment'])) {
diff --git a/web/html/pkgreq.php b/web/html/pkgreq.php
index 4b7d6cf..9dec1f6 100644
--- a/web/html/pkgreq.php
+++ b/web/html/pkgreq.php
@@ -8,7 +8,14 @@ include_once("pkgfuncs.inc.php");
set_lang();
check_sid();
-if (!isset($base_id)) {
+if (isset($base_id)) {
+ html_header(__("File Request"));
+ include('pkgreq_form.php');
+} elseif (isset($pkgreq_id)) {
+ html_header(__("Close Request"));
+ $pkgbase_name = pkgreq_get_pkgbase_name($pkgreq_id);
+ include('pkgreq_close_form.php');
+} else {
if (!check_user_privileges()) {
header('Location: /');
exit();
@@ -63,9 +70,6 @@ if (!isset($base_id)) {
html_header(__("Requests"));
include('pkgreq_results.php');
-} else {
- html_header(__("File Request"));
- include('pkgreq_form.php');
}
html_footer(AUR_VERSION);