From 98b6ba94795b27b098276b30ca9fd61b28b2b110 Mon Sep 17 00:00:00 2001 From: canyonknight Date: Wed, 12 Sep 2012 18:21:22 -0400 Subject: 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 Signed-off-by: Lukas Fleischer --- web/html/index.php | 6 ++++++ web/html/voters.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'web/html') diff --git a/web/html/index.php b/web/html/index.php index 7c4eb47..e6f3771 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -47,6 +47,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); diff --git a/web/html/voters.php b/web/html/voters.php index 0ec77ec..41c9d6f 100644 --- a/web/html/voters.php +++ b/web/html/voters.php @@ -19,7 +19,7 @@ if ($atype == 'Trusted User' || $atype== 'Developer'):
    -
  • +
-- cgit v1.2.3-70-g09d2