diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-30 13:24:33 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-30 13:24:33 +0000 |
| commit | a56fdf0c31e72d4d95146d88481373afd6ffe5a2 (patch) | |
| tree | 913df5cd741851cd8b1f95becefaeb4bda61d4f5 /roundcubemail/program/steps/addressbook/delete.inc | |
| parent | 605d7c0bf292a12909ef8384854d5668a8d500bf (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/addressbook/delete.inc')
| -rw-r--r-- | roundcubemail/program/steps/addressbook/delete.inc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/roundcubemail/program/steps/addressbook/delete.inc b/roundcubemail/program/steps/addressbook/delete.inc index 08ae36dfb..bb0457be7 100644 --- a/roundcubemail/program/steps/addressbook/delete.inc +++ b/roundcubemail/program/steps/addressbook/delete.inc @@ -23,14 +23,15 @@ if ($OUTPUT->ajax_call && ($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid) ) { - $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array('id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); + $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array( + 'id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); - $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : false; - if (!$deleted) - { + $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : $plugin['result']; + + if (!$deleted) { // send error message exit; - } + } // count contacts for this user $result = $CONTACTS->count(); @@ -46,7 +47,7 @@ if ($OUTPUT->ajax_call && // send response $OUTPUT->send(); - } +} exit; |
