On Mon, 13 Jul 2015 at 20:01:26, Marcel Korpel wrote: > This fix uses the POST-Redirect-GET pattern to reload the account > update page. Output if buffered to be able to send the correct headers > after the account has been successfully modified. >
Thanks for looking into this! > Signed-off-by: Marcel Korpel <[email protected]> > --- > web/html/account.php | 12 ++++++++++++ > web/lib/acctfuncs.inc.php | 5 +++-- > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/web/html/account.php b/web/html/account.php > index f5e6c19..d6b12aa 100644 > --- a/web/html/account.php > +++ b/web/html/account.php > @@ -19,6 +19,13 @@ if (in_array($action, $need_userinfo)) { > $PK = implode("\n", account_get_ssh_keys($row["ID"])); > } > > +if (in_request("Update") == "Succeeded") { > + $action = "UpdateSucceeded"; > +} > + I'd prefer a more general solution, i.e. create a general "confirmation" action that we can use everywhere else as well. > +// start output buffering to be able to send headers at a later point Use C-style comments (/* */) please. > +ob_start(); > [...] Can't we easily refactor the current code and move the account processing before the header is printed? Regards, Lukas
