From 131b690e3c30004f6fbc5017c508b32f664f3102 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 14 Apr 2012 17:40:51 +0200 Subject: [PATCH] Add missing method to subscribe to kolab folders --- plugins/libkolab/lib/kolab_storage_folder.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index 9c2cf83f..fa2d697b 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -197,6 +197,25 @@ class kolab_storage_folder return false; } + /** + * Change subscription status of this folder + * + * @param boolean The desired subscription status: true = subscribed, false = not subscribed + * @param string Subscription type (kolab_storage::SERVERSIDE_SUBSCRIPTION or kolab_storage::CLIENTSIDE_SUBSCRIPTION) + * @return True on success, false on error + */ + public function subscribe($subscribed, $type = 0) + { + if ($type == kolab_storage::SERVERSIDE_SUBSCRIPTION) { + return $subscribed ? $this->imap->subscribe($this->name) : $this->imap->unsubscribe($this->name); + } + else { + // TODO: implement this + } + + return false; + } + /** * Get number of objects stored in this folder