From: Gunnar Wrobel Date: Mon, 3 Jan 2011 13:41:35 +0000 (+0100) Subject: Support the synchronize() call in the list API. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4ee0e41575be6057fc02980a3bc03db0f5661b97;p=horde.git Support the synchronize() call in the list API. --- diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php index e29c00204..b444dd5f8 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List.php @@ -49,4 +49,11 @@ extends Horde_Kolab_Storage_Queriable * folder type as values. */ public function listFolderTypes(); + + /** + * Synchronize the list information with the information from the backend. + * + * @return NULL + */ + public function synchronize(); } diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php index 793e511bc..187e1d6b5 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Base.php @@ -79,4 +79,13 @@ implements Horde_Kolab_Storage_List '/shared/vendor/kolab/folder-type' ); } + + /** + * Synchronize the list information with the information from the backend. + * + * @return NULL + */ + public function synchronize() + { + } } \ No newline at end of file diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php index 2b4bba0f1..481407dd4 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Cache.php @@ -155,6 +155,8 @@ implements Horde_Kolab_Storage_List */ public function synchronize() { + $this->_list->synchronize(); + $this->_cache->storeListData( $this->_list->getConnectionId(), self::QUERIES, diff --git a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php index d2816ea4f..7bab527fc 100644 --- a/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php +++ b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/List/Decorator/Log.php @@ -115,4 +115,20 @@ implements Horde_Kolab_Storage_List ); return $result; } + + /** + * Synchronize the list information with the information from the backend. + * + * @return NULL + */ + public function synchronize() + { + $this->_list->synchronize(); + $this->_logger->info( + sprintf( + 'Synchronized folder list for %s.', + $this->getConnectionId() + ) + ); + } } \ No newline at end of file