mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
5c0de7825d
commit
d6f89f97c0
2 changed files with 3 additions and 1 deletions
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
<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): ?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue