summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-09-15 10:02:10 -0400
committerLukas Fleischer <archlinux@cryptocrack.de>2012-09-18 00:59:29 +0200
commitd6f89f97c08d7eeb805246dc94a835057d53243d (patch)
tree391c79462c4c4353d35995b372ab11d7ce7cd3bc /web
parent5c0de7825d2f1680a2a430410be49696aca35946 (diff)
downloadaurweb-d6f89f97c08d7eeb805246dc94a835057d53243d.tar.xz
Use URL rewriting for user account update page
The "UpdateAccount" page displays information as to whether an account update was successful. All POST account info goes to this page, so use it with sane URLs. Before: AUR_URL/account/?Action=UpdateAccount&U=userfoo After: AUR_URL/account/userfoo/update Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/index.php2
-rw-r--r--web/template/account_edit_form.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/web/html/index.php b/web/html/index.php
index 8013362..0e36883 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -55,6 +55,8 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
if (isset($tokens[3])) {
if ($tokens[3] == 'edit') {
$_REQUEST['Action'] = "DisplayAccount";
+ } elseif ($tokens[3] == 'update') {
+ $_REQUEST['Action'] = "UpdateAccount";
} else {
$_REQUEST['Action'] = "AccountInfo";
}
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
index 7da8e33..9b5b1d8 100644
--- a/web/template/account_edit_form.php
+++ b/web/template/account_edit_form.php
@@ -1,4 +1,4 @@
-<form action="<?php echo get_uri('/account/'); ?>" method="post">
+<form action="<?php echo get_user_uri($U) . 'update/'; ?>" method="post">
<fieldset>
<input type="hidden" name="Action" value="<?php echo $A ?>" />
<?php if ($UID): ?>