summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/settings/delete_identity.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-30 13:24:33 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-30 13:24:33 +0000
commita56fdf0c31e72d4d95146d88481373afd6ffe5a2 (patch)
tree913df5cd741851cd8b1f95becefaeb4bda61d4f5 /roundcubemail/program/steps/settings/delete_identity.inc
parent605d7c0bf292a12909ef8384854d5668a8d500bf (diff)
- Plugin API: improved 'abort' flag handling, added 'result' item in some hooks: group_*, contact_*, identity_* (#1486914)
git-svn-id: https://svn.roundcube.net/trunk@4025 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/delete_identity.inc')
-rw-r--r--roundcubemail/program/steps/settings/delete_identity.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/roundcubemail/program/steps/settings/delete_identity.inc b/roundcubemail/program/steps/settings/delete_identity.inc
index 4667fd315..81609d622 100644
--- a/roundcubemail/program/steps/settings/delete_identity.inc
+++ b/roundcubemail/program/steps/settings/delete_identity.inc
@@ -32,12 +32,13 @@ if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid))
{
$plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid));
- if (!$plugin['abort'] && $USER->delete_identity($iid)) {
+ $deleted = !$plugin['abort'] ? $USER->delete_identity($iid) : $plugin['result'];
+
+ if ($deleted)
$OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false);
- }
- else {
- $OUTPUT->show_message('nodeletelastidentity', 'error', null, false);
- }
+ else
+ $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'nodeletelastidentity', 'error', null, false);
+
// send response
if ($OUTPUT->ajax_call)
$OUTPUT->send();
@@ -48,5 +49,3 @@ if ($OUTPUT->ajax_call)
// go to identities page
rcmail_overwrite_action('identities');
-
-