summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-09-13 00:21:22 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-18 00:59:21 +0200
commit98b6ba94795b27b098276b30ca9fd61b28b2b110 (patch)
tree250cc8a639bdbe0f1b07928182c4e197cb6fb63e /web/html/index.php
parent440a66ced0bb8ebe9172f99bc98529645194e0ee (diff)
downloadaur-98b6ba94795b27b098276b30ca9fd61b28b2b110.tar.gz
aur-98b6ba94795b27b098276b30ca9fd61b28b2b110.tar.xz
Use URL rewriting for user info page
Navigation to the "AccountInfo" page should only require a user to know the username of the account they are looking for. Update all AUR links that use the user info page to reflect the new URL. Before: AUR_URL/account/?Action=AccountInfo&U=userfoo After: AUR_URL/account/userfoo Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/index.php')
-rw-r--r--web/html/index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/html/index.php b/web/html/index.php
index 7c4eb475..e6f3771b 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -48,6 +48,12 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
}
include get_route('/' . $tokens[1]);
+} elseif (isset($tokens[1]) && '/' . $tokens[1] == get_user_route()) {
+ if (isset($tokens[2])) {
+ $_REQUEST['U'] = $tokens[2];
+ $_REQUEST['Action'] = "AccountInfo";
+ }
+ include get_route('/' . $tokens[1]);
} elseif (get_route($path) !== NULL) {
include get_route($path);
} else {