Ported to libkolab.
@TODO: remove caching, metadata is already cached by Roundcube storage
This commit is contained in:
parent
a2e191d631
commit
55513b2a19
3 changed files with 40 additions and 36 deletions
|
@ -54,8 +54,9 @@ class kolab_zpush extends rcube_plugin
|
||||||
$this->register_action('plugin.zpushconfig', array($this, 'config_view'));
|
$this->register_action('plugin.zpushconfig', array($this, 'config_view'));
|
||||||
$this->register_action('plugin.zpushjson', array($this, 'json_command'));
|
$this->register_action('plugin.zpushjson', array($this, 'json_command'));
|
||||||
|
|
||||||
if ($this->rc->action == 'plugin.zpushconfig')
|
if ($this->rc->action == 'plugin.zpushconfig') {
|
||||||
$this->require_plugin('kolab_core');
|
$this->require_plugin('libkolab');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,6 +67,8 @@ class kolab_zpush extends rcube_plugin
|
||||||
{
|
{
|
||||||
$storage = $this->rc->get_storage();
|
$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 = $this->rc->get_cache('zpush', 'db', 900);
|
||||||
$this->cache->expunge();
|
$this->cache->expunge();
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ class kolab_zpush_ui
|
||||||
|
|
||||||
$names = array();
|
$names = array();
|
||||||
foreach ($a_folders as $folder) {
|
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)
|
// find folder prefix to truncate (the same code as in kolab_addressbook plugin)
|
||||||
for ($i = count($names)-1; $i >= 0; $i--) {
|
for ($i = count($names)-1; $i >= 0; $i--) {
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
<email>bruederli@kolabsys.com</email>
|
<email>bruederli@kolabsys.com</email>
|
||||||
<active>yes</active>
|
<active>yes</active>
|
||||||
</lead>
|
</lead>
|
||||||
<date>2011-11-14</date>
|
<date>2012-05-14</date>
|
||||||
<time>12:12:00</time>
|
|
||||||
<version>
|
<version>
|
||||||
<release>0.3</release>
|
<release>1.0</release>
|
||||||
|
<api>1.0</api>
|
||||||
</version>
|
</version>
|
||||||
<stability>
|
<stability>
|
||||||
<release>stable</release>
|
<release>stable</release>
|
||||||
|
@ -29,6 +29,7 @@
|
||||||
<file name="kolab_zpush_ui.php" role="php"></file>
|
<file name="kolab_zpush_ui.php" role="php"></file>
|
||||||
<file name="kolab_zpush.js" role="data"></file>
|
<file name="kolab_zpush.js" role="data"></file>
|
||||||
<file name="localization/de_CH.inc" 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/en_US.inc" role="data"></file>
|
||||||
<file name="localization/pl_PL.inc" role="data"></file>
|
<file name="localization/pl_PL.inc" role="data"></file>
|
||||||
<file name="skins/default/templates/config.html" role="data"></file>
|
<file name="skins/default/templates/config.html" role="data"></file>
|
||||||
|
|
Loading…
Add table
Reference in a new issue