diff options
author | thomascube <thomas@roundcube.net> | 2009-05-01 19:04:26 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-05-01 19:04:26 +0000 |
commit | 69f18a09aec6e352ff021cd9c5db806f341b7e48 (patch) | |
tree | ff869e93ea898103cb7e63b749b01c689355201a /program/steps/addressbook/delete.inc | |
parent | 762a699dc7a5d0e3971a4679f714b7fa8d8832cf (diff) |
Add plugin hooks for creating/saving/deleting identities and contacts
Diffstat (limited to 'program/steps/addressbook/delete.inc')
-rw-r--r-- | program/steps/addressbook/delete.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index df1e4073e..6ab9cc3df 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -24,7 +24,9 @@ if (($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && preg_match('/^[a-zA-Z0-9=]+(,[a-zA-Z0-9=]+)*$/', $cid)) ) { - $deleted = $CONTACTS->delete($cid); + $plugin = $RCMAIL->plugins->exec_hook('delete_contact', array('id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); + + $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : false; if (!$deleted) { // send error message |