mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Only print no changes message if queries failed
This commit changes the messages printed when changing the accound details so that it only prints that no changes were made if either the account change SQL query or the account_set_ssh_keys call failed. Reported-by: Alexis Chotard <alexis.horgix.chotard@gmail.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
c1ac7dced0
commit
eb169d3b0b
1 changed files with 2 additions and 2 deletions
|
@ -348,9 +348,9 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$P="",$C="",
|
||||||
$q.= " WHERE ID = ".intval($UID);
|
$q.= " WHERE ID = ".intval($UID);
|
||||||
$result = $dbh->exec($q);
|
$result = $dbh->exec($q);
|
||||||
|
|
||||||
account_set_ssh_keys($UID, $ssh_keys, $ssh_fingerprints);
|
$ssh_key_result = account_set_ssh_keys($UID, $ssh_keys, $ssh_fingerprints);
|
||||||
|
|
||||||
if (!$result) {
|
if ($result === false || $ssh_key_result === false) {
|
||||||
print __("No changes were made to the account, %s%s%s.",
|
print __("No changes were made to the account, %s%s%s.",
|
||||||
"<strong>", htmlspecialchars($U,ENT_QUOTES), "</strong>");
|
"<strong>", htmlspecialchars($U,ENT_QUOTES), "</strong>");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue