Commit d6f89f97 authored by canyonknight's avatar canyonknight Committed by Lukas Fleischer
Browse files

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: default avatarcanyonknight <canyonknight@gmail.com>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent 5c0de782
...@@ -55,6 +55,8 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { ...@@ -55,6 +55,8 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
if (isset($tokens[3])) { if (isset($tokens[3])) {
if ($tokens[3] == 'edit') { if ($tokens[3] == 'edit') {
$_REQUEST['Action'] = "DisplayAccount"; $_REQUEST['Action'] = "DisplayAccount";
} elseif ($tokens[3] == 'update') {
$_REQUEST['Action'] = "UpdateAccount";
} else { } else {
$_REQUEST['Action'] = "AccountInfo"; $_REQUEST['Action'] = "AccountInfo";
} }
......
<form action="<?php echo get_uri('/account/'); ?>" method="post"> <form action="<?php echo get_user_uri($U) . 'update/'; ?>" method="post">
<fieldset> <fieldset>
<input type="hidden" name="Action" value="<?php echo $A ?>" /> <input type="hidden" name="Action" value="<?php echo $A ?>" />
<?php if ($UID): ?> <?php if ($UID): ?>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment