plugins/libkolab
Thomas Brüderli
bruederli at kolabsys.com
Sat May 26 15:37:42 CEST 2012
plugins/libkolab/lib/kolab_storage_cache.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit e9be3f05ffebd9aa0cc3a0c3155a28149fa3cb17
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sat May 26 15:37:35 2012 +0200
Read 'max_allowed_packet' from mysql config (requires latest HEAD of Roundcube core)
diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php
index 5f13547..8ee04be 100644
--- a/plugins/libkolab/lib/kolab_storage_cache.php
+++ b/plugins/libkolab/lib/kolab_storage_cache.php
@@ -49,10 +49,14 @@ class kolab_storage_cache
$this->imap = $rcmail->get_storage();
$this->enabled = $rcmail->config->get('kolab_cache', false);
- // remove sync-lock on script termination
- if ($this->enabled)
+ if ($this->enabled) {
+ // remove sync-lock on script termination
$rcmail->add_shutdown_function(array($this, '_sync_unlock'));
+ // read max_allowed_packet from mysql config
+ $this->max_sql_packet = min($this->db->get_variable('max_allowed_packet', 1048500), 4*1024*1024) - 2000; // mysql limit or max 4 MB
+ }
+
if ($storage_folder)
$this->set_folder($storage_folder);
}
More information about the commits
mailing list