Add missing database and account fields

Commits 6ec4a35 (Send notifications when changing ownership, 2016-02-21)
and e3670ef (Add a homepage field to accounts, 2016-06-02) forgot to
change some usages of display_account_form() and process_account_form()
to account for the new parameter. The former also forgot to add the new
column to the database schema.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Johannes Löthberg 2016-06-22 23:24:24 +02:00 committed by Lukas Fleischer
parent e3670ef188
commit a2a888625e
3 changed files with 44 additions and 11 deletions

View file

@ -41,6 +41,7 @@ CREATE TABLE Users (
RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, RegistrationTS TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CommentNotify TINYINT(1) NOT NULL DEFAULT 1, CommentNotify TINYINT(1) NOT NULL DEFAULT 1,
UpdateNotify TINYINT(1) NOT NULL DEFAULT 0, UpdateNotify TINYINT(1) NOT NULL DEFAULT 0,
OwnershipNotify TINYINT(1) NOT NULL DEFAULT 1,
PRIMARY KEY (ID), PRIMARY KEY (ID),
UNIQUE (Username), UNIQUE (Username),
UNIQUE (Email), UNIQUE (Email),

View file

@ -34,9 +34,10 @@ if ($action == "UpdateAccount") {
in_request("U"), in_request("T"), in_request("S"), in_request("U"), in_request("T"), in_request("S"),
in_request("E"), in_request("H"), in_request("P"), in_request("E"), in_request("H"), in_request("P"),
in_request("C"), in_request("R"), in_request("L"), in_request("C"), in_request("R"), in_request("L"),
in_request("I"), in_request("K"), in_request("PK"), in_request("HP"), in_request("I"), in_request("K"),
in_request("J"), in_request("CN"), in_request("UN"), in_request("PK"), in_request("J"), in_request("CN"),
in_request("ID"), $row["Username"]); in_request("UN"), in_request("ON"), in_request("ID"),
$row["Username"]);
} }
} }
@ -95,6 +96,7 @@ if (isset($_COOKIE["AURSID"])) {
$row["InactivityTS"] ? 1 : 0, $row["InactivityTS"] ? 1 : 0,
$row["CommentNotify"], $row["CommentNotify"],
$row["UpdateNotify"], $row["UpdateNotify"],
$row["OwnershipNotify"],
$row["ID"], $row["ID"],
$row["Username"]); $row["Username"]);
} else { } else {
@ -146,6 +148,7 @@ if (isset($_COOKIE["AURSID"])) {
in_request("J"), in_request("J"),
in_request("CN"), in_request("CN"),
in_request("UN"), in_request("UN"),
in_request("ON"),
in_request("ID"), in_request("ID"),
$row["Username"]); $row["Username"]);
} }

View file

@ -20,18 +20,47 @@ echo '<h2>' . __('Register') . '</h2>';
if (in_request("Action") == "NewAccount") { if (in_request("Action") == "NewAccount") {
list($success, $message) = process_account_form( list($success, $message) = process_account_form(
"new", "NewAccount", in_request("U"), 1, 0, "new",
in_request("E"), in_request("H"), '', '', in_request("R"), "NewAccount",
in_request("L"), in_request("I"), in_request("K"), in_request("U"),
in_request("PK"), 0, in_request("CN"), in_request("UN")); 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; print $message;
if (!$success) { if (!$success) {
display_account_form("NewAccount", in_request("U"), 1, 0, display_account_form("NewAccount",
in_request("E"), in_request("H"), '', '', in_request("R"), in_request("U"),
in_request("L"), in_request("I"), in_request("K"), 1,
in_request("PK"), 0, in_request("CN"), in_request("UN")); 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 { } else {
print '<p>' . __("Use this form to create an account.") . '</p>'; print '<p>' . __("Use this form to create an account.") . '</p>';