[aur-dev] [PATCH v2 1/3] Use username from the database if one is provided by the user

2015-07-13 Thread Marcel Korpel
This fixes a bug where the new user name input by the user was invalid, causing the account deletion link and the form action to be wrong. Signed-off-by: Marcel Korpel --- web/html/account.php | 4 ++-- web/lib/acctfuncs.inc.php | 8 +--- web/template/account_edit_form

[aur-dev] [PATCH v2 3/3] Set correct 'My Account' link after changing username

2015-07-13 Thread Marcel Korpel
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. Signed-off-by: Marcel Korpel --- web/html/account.php | 12 web/lib/acctfuncs.inc.php | 5

[aur-dev] [PATCH v2 2/3] Surround message with tags

2015-07-13 Thread Marcel Korpel
Signed-off-by: Marcel Korpel --- web/html/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/html/register.php b/web/html/register.php index 014d802..cb3e8dd 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -25,7 +25,7 @@ if (in_request("Action")

Re: [aur-dev] [PATCH 3/3] Only output page header after account has been modified

2015-07-13 Thread Marcel Korpel
* Marcel Korpel (Mon, 13 Jul 2015 16:22:43 +0200): > Also a better solution! We will have to send error messages through, > though, which is not trivial. Using a GET parameter? That doesn't feel > like the best way. Looking better at it, it *seems* easier, as the only time we need to use PRG is w

Re: [aur-dev] [PATCH 3/3] Only output page header after account has been modified

2015-07-13 Thread Marcel Korpel
* Lukas Fleischer (Mon, 13 Jul 2015 09:15:49 +0200): > Ugh, that's a lot of hacky code, just to get the page title right. > Maybe we should rather use PRG here to avoid all that? Also a better solution! We will have to send error messages through, though, which is not trivial. Using a GET paramet

Re: [aur-dev] [PATCH 1/3] Use username from the database if one is provided by the user

2015-07-13 Thread Marcel Korpel
* Lukas Fleischer (Mon, 13 Jul 2015 09:13:24 +0200): > Could you explain why this is needed? Doesn't $N always refer to the > correct user name? Related comment below. […] > I am confused. We only call display_account_form() here if an error > occurs *before* updating the account. Shouldn't we *al

Re: [aur-dev] [PATCH 3/3] Only output page header after account has been modified

2015-07-13 Thread Lukas Fleischer
On Sat, 11 Jul 2015 at 18:58:00, Marcel Korpel wrote: > When a user account is modified, the 'My Account' link should contain > the new username, otherwise clicking it directly after editing a > username will result in a 404. > > Signed-off-by: Marcel Korpel > --- > web/html/account.php | 1

Re: [aur-dev] [PATCH 1/3] Use username from the database if one is provided by the user

2015-07-13 Thread Lukas Fleischer
On Sat, 11 Jul 2015 at 18:57:58, Marcel Korpel wrote: > This fixes a bug where the new user name input by the user was > invalid, causing the account deletion link and the form action to be > wrong. > > Signed-off-by: Marcel Korpel > --- > web/html/account.php | 2 +- > web/lib/ac