summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-27 17:48:39 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-27 18:00:39 +0200
commiteb169d3b0b5d873d85791595a4e64df1ed337e1e (patch)
tree9ccd417a97769250dd458b9d98e7bff73913332b /web
parentc1ac7dced0626228327f60fac530522d32f992e6 (diff)
downloadaur-eb169d3b0b5d873d85791595a4e64df1ed337e1e.tar.gz
aur-eb169d3b0b5d873d85791595a4e64df1ed337e1e.tar.xz
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>
Diffstat (limited to 'web')
-rw-r--r--web/lib/acctfuncs.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 417ee6dd..861de0ac 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -348,9 +348,9 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$P="",$C="",
$q.= " WHERE ID = ".intval($UID);
$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.",
"<strong>", htmlspecialchars($U,ENT_QUOTES), "</strong>");
} else {