summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/settings/delete_identity.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-19 20:41:24 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-04-19 20:41:24 +0000
commit21b3b8c5dcd085bd1040add692b8fd6b09b33904 (patch)
tree592f05cce72f10580c3e69a7a5a0d6fa532ef563 /roundcubemail/program/steps/settings/delete_identity.inc
parent47dcc5411ec51b6e06fa3ae68e3fd0375b88df08 (diff)
Gracefully shrug on database errors
git-svn-id: https://svn.roundcube.net/trunk@4668 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/delete_identity.inc')
-rw-r--r--roundcubemail/program/steps/settings/delete_identity.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/settings/delete_identity.inc b/roundcubemail/program/steps/settings/delete_identity.inc
index 9f76046b7..275bcb684 100644
--- a/roundcubemail/program/steps/settings/delete_identity.inc
+++ b/roundcubemail/program/steps/settings/delete_identity.inc
@@ -34,10 +34,10 @@ if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid))
$deleted = !$plugin['abort'] ? $USER->delete_identity($iid) : $plugin['result'];
- if ($deleted)
+ if ($deleted > 0 && $deleted !== false)
$OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false);
else
- $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'nodeletelastidentity', 'error', null, false);
+ $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : ($deleted < 0 ? 'nodeletelastidentity' : 'errorsaving'), 'error', null, false);
// send response
if ($OUTPUT->ajax_call)