diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php index 7bae562a..7287fc2c 100644 --- a/plugins/libkolab/lib/kolab_storage.php +++ b/plugins/libkolab/lib/kolab_storage.php @@ -332,6 +332,9 @@ class kolab_storage if ($folder = self::get_folder($name)) $folder->cache->purge(); + $rcmail = rcube::get_instance(); + $plugin = $rcmail->plugins->exec_hook('folder_delete', array('name' => $name)); + $success = self::$imap->delete_folder($name); self::$last_error = self::$imap->get_error_str(); @@ -352,6 +355,12 @@ class kolab_storage { self::setup(); + $rcmail = rcube::get_instance(); + $plugin = $rcmail->plugins->exec_hook('folder_create', array('record' => array( + 'name' => $name, + 'subscribe' => $subscribed, + ))); + if ($saved = self::$imap->create_folder($name, $subscribed)) { // set metadata for folder type if ($type) { @@ -389,6 +398,10 @@ class kolab_storage { self::setup(); + $rcmail = rcube::get_instance(); + $plugin = $rcmail->plugins->exec_hook('folder_rename', array( + 'oldname' => $oldname, 'newname' => $newname)); + $oldfolder = self::get_folder($oldname); $active = self::folder_is_active($oldname); $success = self::$imap->rename_folder($oldname, $newname);