diff options
author | canyonknight <canyonknight@gmail.com> | 2012-09-12 23:32:43 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-09-18 00:59:23 +0200 |
commit | 5c0de7825d2f1680a2a430410be49696aca35946 (patch) | |
tree | a513a3ef3d028c63aa5b6076e35acf3f59d2c29d /web/html | |
parent | 98b6ba94795b27b098276b30ca9fd61b28b2b110 (diff) | |
download | aur-5c0de7825d2f1680a2a430410be49696aca35946.tar.gz aur-5c0de7825d2f1680a2a430410be49696aca35946.tar.xz |
Use URL rewriting for user editing page
Allows for easier account editing and saner URLs. Update account editing links
to use new URL.
Before:
AUR_URL/account/?Action=DisplayAccount&U=userfoo
After:
AUR_URL/account/userfoo/edit
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/index.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/web/html/index.php b/web/html/index.php index e6f3771b..8013362b 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -51,7 +51,15 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { } elseif (isset($tokens[1]) && '/' . $tokens[1] == get_user_route()) { if (isset($tokens[2])) { $_REQUEST['U'] = $tokens[2]; - $_REQUEST['Action'] = "AccountInfo"; + + if (isset($tokens[3])) { + if ($tokens[3] == 'edit') { + $_REQUEST['Action'] = "DisplayAccount"; + } else { + $_REQUEST['Action'] = "AccountInfo"; + } + } + } include get_route('/' . $tokens[1]); } elseif (get_route($path) !== NULL) { |