Ported to libkolab.

@TODO: remove caching, metadata is already cached by Roundcube storage
This commit is contained in:
Aleksander Machniak 2012-05-14 15:45:21 +02:00
parent a2e191d631
commit 55513b2a19
3 changed files with 40 additions and 36 deletions

View file

@ -54,8 +54,9 @@ class kolab_zpush extends rcube_plugin
$this->register_action('plugin.zpushconfig', array($this, 'config_view'));
$this->register_action('plugin.zpushjson', array($this, 'json_command'));
if ($this->rc->action == 'plugin.zpushconfig')
$this->require_plugin('kolab_core');
if ($this->rc->action == 'plugin.zpushconfig') {
$this->require_plugin('libkolab');
}
}
@ -66,6 +67,8 @@ class kolab_zpush extends rcube_plugin
{
$storage = $this->rc->get_storage();
// @TODO: Metadata is already cached by rcube storage, get rid of cache here
$this->cache = $this->rc->get_cache('zpush', 'db', 900);
$this->cache->expunge();

View file

@ -129,7 +129,7 @@ class kolab_zpush_ui
$names = array();
foreach ($a_folders as $folder) {
$foldername = $origname = preg_replace('/^INBOX »\s+/', '', rcube_kolab::object_name($folder));
$foldername = $origname = preg_replace('/^INBOX »\s+/', '', kolab_storage::object_name($folder));
// find folder prefix to truncate (the same code as in kolab_addressbook plugin)
for ($i = count($names)-1; $i >= 0; $i--) {

View file

@ -13,10 +13,10 @@
<email>bruederli@kolabsys.com</email>
<active>yes</active>
</lead>
<date>2011-11-14</date>
<time>12:12:00</time>
<date>2012-05-14</date>
<version>
<release>0.3</release>
<release>1.0</release>
<api>1.0</api>
</version>
<stability>
<release>stable</release>
@ -29,6 +29,7 @@
<file name="kolab_zpush_ui.php" role="php"></file>
<file name="kolab_zpush.js" role="data"></file>
<file name="localization/de_CH.inc" role="data"></file>
<file name="localization/de_DE.inc" role="data"></file>
<file name="localization/en_US.inc" role="data"></file>
<file name="localization/pl_PL.inc" role="data"></file>
<file name="skins/default/templates/config.html" role="data"></file>