summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 13:25:47 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 13:54:06 +0200
commitf4613442114b36d32e903b5b0608b73e32bdbc3f (patch)
treecf8fe2f3365d41ad94b1583443034846310735a7 /web/html/index.php
parentc1c77836a8b1e01f6a6f69d3cdd35321d5bf203e (diff)
downloadaur-f4613442114b36d32e903b5b0608b73e32bdbc3f.tar.gz
aur-f4613442114b36d32e903b5b0608b73e32bdbc3f.tar.xz
Move package actions to package bases
Package actions now operate on package bases instead of packages. Move all actions to the correct locations. This also fixes some issues with comment notifications. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/index.php')
-rw-r--r--web/html/index.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/web/html/index.php b/web/html/index.php
index e79955ec..fe74857c 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -20,6 +20,22 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
include "./404.php";
return;
}
+ }
+
+ include get_route('/' . $tokens[1]);
+} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_pkgbase_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. */
+ $pkgbase_name = $tokens[2];
+ $base_id = pkgbase_from_name($pkgbase_name);
+
+ if (!$base_id) {
+ header("HTTP/1.0 404 Not Found");
+ include "./404.php";
+ return;
+ }
if (!empty($tokens[3])) {
/* TODO: Remove support for legacy URIs and move these
@@ -65,23 +81,7 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
return;
}
- $_POST['IDs'] = array(pkgid_from_name($tokens[2]) => '1');
- }
- }
-
- include get_route('/' . $tokens[1]);
-} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_pkgbase_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. */
- $pkgbase_name = $tokens[2];
- $base_id = pkgbase_from_name($pkgbase_name);
-
- if (!$base_id) {
- header("HTTP/1.0 404 Not Found");
- include "./404.php";
- return;
+ $_POST['IDs'] = array(pkgbase_from_name($tokens[2]) => '1');
}
}