[aur-dev] [PATCH] Fixup for missing changes in 6ec4a3589
Commit 6ec4a3589 forgot to change the usages of the display_account_form and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Accidentally broke editing account details. It took me way too long to figure this out.. schema/aur-schema.sql | 1 + web/html/account.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 0804ac3..4c495ea 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -40,6 +40,7 @@ CREATE TABLE Users ( RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CommentNotify TINYINT(1) NOT NULL DEFAULT 1, UpdateNotify TINYINT(1) NOT NULL DEFAULT 0, + OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1, PRIMARY KEY (ID), UNIQUE (Username), UNIQUE (Email), diff --git a/web/html/account.php b/web/html/account.php index 9007ace..c77aedb 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -36,7 +36,7 @@ if ($action == "UpdateAccount") { in_request("C"), in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("ON"), in_request("ID"), $row["Username"]); } } @@ -83,7 +83,8 @@ if (isset($_COOKIE["AURSID"])) { $row["HideEmail"], "", "", $row["RealName"], $row["LangPreference"], $row["IRCNick"], $row["PGPKey"], $PK, $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"], - $row["UpdateNotify"], $row["ID"], $row["Username"]); + $row["UpdateNotify"], $row["OwnershipNotify"], + $row["ID"], $row["Username"]); } else { print __("You do not have permission to edit this account."); } @@ -124,7 +125,8 @@ if (isset($_COOKIE["AURSID"])) { in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("ON"), in_request("ID"), + $row["Username"]); } } else { -- 2.9.0
Err, d'oh, based it on master instead of pu, so doesn't apply to pu. On 22/06, Johannes Löthberg via aur-dev wrote:
Commit 6ec4a3589 forgot to change the usages of the display_account_form and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Accidentally broke editing account details. It took me way too long to figure this out..
schema/aur-schema.sql | 1 + web/html/account.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 0804ac3..4c495ea 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -40,6 +40,7 @@ CREATE TABLE Users ( RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CommentNotify TINYINT(1) NOT NULL DEFAULT 1, UpdateNotify TINYINT(1) NOT NULL DEFAULT 0, + OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1, PRIMARY KEY (ID), UNIQUE (Username), UNIQUE (Email), diff --git a/web/html/account.php b/web/html/account.php index 9007ace..c77aedb 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -36,7 +36,7 @@ if ($action == "UpdateAccount") { in_request("C"), in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("ON"), in_request("ID"), $row["Username"]); } }
@@ -83,7 +83,8 @@ if (isset($_COOKIE["AURSID"])) { $row["HideEmail"], "", "", $row["RealName"], $row["LangPreference"], $row["IRCNick"], $row["PGPKey"], $PK, $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"], - $row["UpdateNotify"], $row["ID"], $row["Username"]); + $row["UpdateNotify"], $row["OwnershipNotify"], + $row["ID"], $row["Username"]); } else { print __("You do not have permission to edit this account."); } @@ -124,7 +125,8 @@ if (isset($_COOKIE["AURSID"])) { in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("ON"), in_request("ID"), + $row["Username"]); }
} else { -- 2.9.0
-- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
Commit 6ec4a3589 forgot to change the usages of the display_account_form and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Based off of pu, e3670ef1888a3f030452b229e8d48b83bb83b240 schema/aur-schema.sql | 1 + web/html/account.php | 4 +++- web/html/register.php | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 7edf94c..1affc25 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -41,6 +41,7 @@ CREATE TABLE Users ( RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CommentNotify TINYINT(1) NOT NULL DEFAULT 1, UpdateNotify TINYINT(1) NOT NULL DEFAULT 0, + OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1, PRIMARY KEY (ID), UNIQUE (Username), UNIQUE (Email), diff --git a/web/html/account.php b/web/html/account.php index 8d92b2c..3370996 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -36,7 +36,7 @@ if ($action == "UpdateAccount") { in_request("C"), in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("ON"), in_request("ID"), $row["Username"]); } } @@ -95,6 +95,7 @@ if (isset($_COOKIE["AURSID"])) { $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"], $row["UpdateNotify"], + $row["OwnershipNotify"], $row["ID"], $row["Username"]); } else { @@ -146,6 +147,7 @@ if (isset($_COOKIE["AURSID"])) { in_request("J"), in_request("CN"), in_request("UN"), + in_request("ON"), in_request("ID"), $row["Username"]); } diff --git a/web/html/register.php b/web/html/register.php index 3155449..4a60b9b 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -23,7 +23,8 @@ if (in_request("Action") == "NewAccount") { "new", "NewAccount", in_request("U"), 1, 0, in_request("E"), in_request("H"), '', '', in_request("R"), in_request("L"), in_request("I"), in_request("K"), - in_request("PK"), 0, in_request("CN"), in_request("UN")); + in_request("PK"), 0, in_request("CN"), in_request("UN"), + in_request("ON")); print $message; @@ -31,7 +32,8 @@ if (in_request("Action") == "NewAccount") { display_account_form("NewAccount", in_request("U"), 1, 0, in_request("E"), in_request("H"), '', '', in_request("R"), in_request("L"), in_request("I"), in_request("K"), - in_request("PK"), 0, in_request("CN"), in_request("UN")); + in_request("PK"), 0, in_request("CN"), in_request("UN"), + in_request("ON")); } } else { print '<p>' . __("Use this form to create an account.") . '</p>'; -- 2.9.0
Commit 6ec4a3589 forgot to change the usages of the display_account_form and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Added some more missing arguments. With this patch the homepage patch on pu works. schema/aur-schema.sql | 1 + web/html/account.php | 9 ++++++--- web/html/register.php | 45 +++++++++++++++++++++++++++++++++++++-------- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 7edf94c..1affc25 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -41,6 +41,7 @@ CREATE TABLE Users ( RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, CommentNotify TINYINT(1) NOT NULL DEFAULT 1, UpdateNotify TINYINT(1) NOT NULL DEFAULT 0, + OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1, PRIMARY KEY (ID), UNIQUE (Username), UNIQUE (Email), diff --git a/web/html/account.php b/web/html/account.php index 8d92b2c..2892f04 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -34,9 +34,10 @@ if ($action == "UpdateAccount") { in_request("U"), in_request("T"), in_request("S"), in_request("E"), in_request("H"), in_request("P"), in_request("C"), in_request("R"), in_request("L"), - in_request("I"), in_request("K"), in_request("PK"), - in_request("J"), in_request("CN"), in_request("UN"), - in_request("ID"), $row["Username"]); + in_request("HP"), in_request("I"), in_request("K"), + in_request("PK"), in_request("J"), in_request("CN"), + in_request("UN"), in_request("ON"), in_request("ID"), + $row["Username"]); } } @@ -95,6 +96,7 @@ if (isset($_COOKIE["AURSID"])) { $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"], $row["UpdateNotify"], + $row["OwnershipNotify"], $row["ID"], $row["Username"]); } else { @@ -146,6 +148,7 @@ if (isset($_COOKIE["AURSID"])) { in_request("J"), in_request("CN"), in_request("UN"), + in_request("ON"), in_request("ID"), $row["Username"]); } diff --git a/web/html/register.php b/web/html/register.php index 3155449..6c6d52e 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -20,18 +20,47 @@ echo '<h2>' . __('Register') . '</h2>'; if (in_request("Action") == "NewAccount") { list($success, $message) = process_account_form( - "new", "NewAccount", in_request("U"), 1, 0, - in_request("E"), in_request("H"), '', '', in_request("R"), - in_request("L"), in_request("I"), in_request("K"), - in_request("PK"), 0, in_request("CN"), in_request("UN")); + "new", + "NewAccount", + in_request("U"), + 1, + 0, + in_request("E"), + in_request("H"), + '', + '', + in_request("R"), + in_request("L"), + in_request("HP"), + in_request("I"), + in_request("K"), + in_request("PK"), + 0, + in_request("CN"), + in_request("UN"), + in_request("ON")); print $message; if (!$success) { - display_account_form("NewAccount", in_request("U"), 1, 0, - in_request("E"), in_request("H"), '', '', in_request("R"), - in_request("L"), in_request("I"), in_request("K"), - in_request("PK"), 0, in_request("CN"), in_request("UN")); + display_account_form("NewAccount", + in_request("U"), + 1, + 0, + in_request("E"), + in_request("H"), + '', + '', + in_request("R"), + in_request("L"), + in_request("HP"), + in_request("I"), + in_request("K"), + in_request("PK"), + 0, + in_request("CN"), + in_request("UN"), + in_request("ON")); } } else { print '<p>' . __("Use this form to create an account.") . '</p>'; -- 2.9.0
On Wed, 22 Jun 2016 at 23:24:24, Johannes Löthberg via aur-dev wrote:
Commit 6ec4a3589 forgot to change the usages of the display_account_form and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- Added some more missing arguments. With this patch the homepage patch on pu works.
Just to be sure: This now fixes issues with both 6ec4a35 (Send notifications when changing ownership, 2016-02-21) and e3670ef (Add a homepage field to accounts, 2016-06-02), right? I will queue this with a slightly amended commit message that also mentions e3670ef. Thanks!
schema/aur-schema.sql | 1 + web/html/account.php | 9 ++++++--- web/html/register.php | 45 +++++++++++++++++++++++++++++++++++++-------- 3 files changed, 44 insertions(+), 11 deletions(-) [...]
On Jun 25, 2016 13:52, Lukas Fleischer <lfleischer@archlinux.org> wrote:
On Wed, 22 Jun 2016 at 23:24:24, Johannes L�thberg via aur-dev wrote:
Commit 6ec4a3589 forgot to change the usages of the
and process_account_form function to account for the new parameter, and forgot to add the new column to aur-schema.sql.
Signed-off-by: Johannes L�thberg <johannes@kyriasis.com> --- Added some more missing arguments. With this patch the homepage
display_account_form patch
on pu works.
Just to be sure: This now fixes issues with both 6ec4a35 (Send notifications when changing ownership, 2016-02-21) and e3670ef (Add a homepage field to accounts, 2016-06-02), right?
I will queue this with a slightly amended commit message that also mentions e3670ef. Thanks!
Ah, yes. Originally I did fixes for the first as I did a bisect and then forgot to rewrite the commit message.
participants (2)
-
Johannes Löthberg
-
Lukas Fleischer