Projects
Kolab:16:TestingLinked
roundcubemail-plugins-kolab
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 79
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -41,9 +41,9 @@ %global dash_rel_suffix %{?rc_rel_suffix:-%{rc_rel_suffix}} Name: roundcubemail-plugins-kolab -Version: 3.5.4 +Version: 3.5.5 -Release: 3%{?dot_rel_suffix}%{?dist} +Release: 1%{?dot_rel_suffix}%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail @@ -62,6 +62,7 @@ Source104: plesk.libkolab.inc.php Patch0000: roundcubemail-plugins-kolab-3.4-kolab-files-manticore-api.patch +Patch0001: 0001-Fix-kolab-cache-sync-issues.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch @@ -1406,6 +1407,7 @@ %endif %patch0000 -p1 +%patch0001 -p1 find -type d -name "helpdocs" -exec rm -rvf {} \; 2>/dev/null || : @@ -2792,6 +2794,9 @@ %defattr(-,root,root,-) %changelog +* Fri Oct 16 2020 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.5.5-1 +- Release of version 3.5.5 + * Mon Jul 6 2020 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.5.4-3 - Bump release for rebuild
View file
0001-Fix-kolab-cache-sync-issues.patch
Added
@@ -0,0 +1,537 @@ +From 23c76d2ef80b35acf8d86ae4e4391020918998cf Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <machniak@kolabsys.com> +Date: Fri, 16 Oct 2020 11:01:12 +0200 +Subject: PATCH Fix kolab cache sync issues + +Summary: Use QRESYNC, get rid of "scheduled" cache reset, other small improvements + +Reviewers: #roundcube_kolab_plugins_developers + +Subscribers: #roundcube_kolab_plugins_developers + +Differential Revision: https://git.kolab.org/D1726 +--- + plugins/libkolab/config.inc.php.dist | 4 - + plugins/libkolab/lib/kolab_storage_cache.php | 404 ++++++++++++++----- + 2 files changed, 295 insertions(+), 113 deletions(-) + +diff --git a/plugins/libkolab/config.inc.php.dist b/plugins/libkolab/config.inc.php.dist +index 81f4ea80..9801af37 100644 +--- a/plugins/libkolab/config.inc.php.dist ++++ b/plugins/libkolab/config.inc.php.dist +@@ -5,10 +5,6 @@ + // Enable caching of Kolab objects in local database + $config'kolab_cache' = true; + +-// Cache refresh interval (default is 12 hours) +-// after this period, cache is forced to synchronize with IMAP +-$config'kolab_cache_refresh' = '12h'; +- + // Specify format version to write Kolab objects (must be a string value!) + $config'kolab_format_version' = '3.0'; + +diff --git a/plugins/libkolab/lib/kolab_storage_cache.php b/plugins/libkolab/lib/kolab_storage_cache.php +index 8f682e54..18b5e5f2 100644 +--- a/plugins/libkolab/lib/kolab_storage_cache.php ++++ b/plugins/libkolab/lib/kolab_storage_cache.php +@@ -27,8 +27,6 @@ class kolab_storage_cache + const DB_DATE_FORMAT = 'Y-m-d H:i:s'; + const MAX_RECORDS = 500; + +- public $sync_complete = false; +- + protected $db; + protected $imap; + protected $folder; +@@ -42,7 +40,6 @@ class kolab_storage_cache + protected $synclock = false; + protected $ready = false; + protected $cache_table; +- protected $cache_refresh = 3600; + protected $folders_table; + protected $max_sql_packet; + protected $max_sync_lock_time = 600; +@@ -85,7 +82,6 @@ class kolab_storage_cache + $this->imap = $rcmail->get_storage(); + $this->enabled = $rcmail->config->get('kolab_cache', false); + $this->folders_table = $this->db->table_name('kolab_folders'); +- $this->cache_refresh = get_offset_sec($rcmail->config->get('kolab_cache_refresh', '12h')); + $this->server_timezone = new DateTimeZone(date_default_timezone_get()); + + if ($this->enabled) { +@@ -174,16 +170,6 @@ class kolab_storage_cache + if ($this->synched) + return; + +- // increase time limit +- @set_time_limit($this->max_sync_lock_time - 60); +- +- // get effective time limit we have for synchronization (~70% of the execution time) +- $time_limit = ini_get('max_execution_time') * 0.7; +- $sync_start = time(); +- +- // assume sync will be completed +- $this->sync_complete = true; +- + if (!$this->ready) { + // kolab cache is disabled, synchronize IMAP mailbox cache only + $this->imap_mode(true); +@@ -191,124 +177,312 @@ class kolab_storage_cache + $this->imap_mode(false); + } + else { ++ $this->sync_start = time(); ++ + // read cached folder metadata + $this->_read_folder_data(); + ++ // Read folder data from IMAP ++ $ctag = $this->folder->get_ctag(); ++ ++ // Validate current ctag ++ list($uidvalidity, $highestmodseq, $uidnext) = explode('-', $ctag); ++ ++ if (empty($uidvalidity) || empty($highestmodseq)) { ++ rcube::raise_error(array( ++ 'code' => 900, ++ 'message' => "Failed to sync the kolab cache (Invalid ctag)" ++ ), true); ++ } + // check cache status ($this->metadata is set in _read_folder_data()) +- if ( empty($this->metadata'ctag') || +- empty($this->metadata'changed') || +- $this->metadata'objectcount' === null || +- $this->metadata'changed' < date(self::DB_DATE_FORMAT, time() - $this->cache_refresh) || +- $this->metadata'ctag' != $this->folder->get_ctag() || +- intval($this->metadata'objectcount') !== $this->count() ++ else if ( ++ empty($this->metadata'ctag') ++ || empty($this->metadata'changed') ++ || $this->metadata'ctag' !== $ctag + ) { + // lock synchronization for this folder or wait if locked + $this->_sync_lock(); + +- // disable messages cache if configured to do so +- $this->imap_mode(true); ++ // Run a full-sync (initial sync or continue the aborted sync) ++ if (empty($this->metadata'changed') || empty($this->metadata'ctag')) { ++ $result = $this->synchronize_full(); ++ } ++ // Synchronize only the changes since last sync ++ else { ++ $result = $this->synchronize_update($ctag); ++ } ++ ++ // update ctag value (will be written to database in _sync_unlock()) ++ if ($result) { ++ $this->metadata'ctag' = $ctag; ++ $this->metadata'changed' = date(self::DB_DATE_FORMAT, time()); ++ } ++ ++ // remove lock ++ $this->_sync_unlock(); ++ } ++ } + +- // synchronize IMAP mailbox cache +- $this->imap->folder_sync($this->folder->name); ++ $this->check_error(); ++ $this->synched = time(); ++ } + +- // compare IMAP index with object cache index +- $imap_index = $this->imap->index($this->folder->name, null, null, true, true); ++ /** ++ * Perform full cache synchronization ++ */ ++ protected function synchronize_full() ++ { ++ // get effective time limit we have for synchronization (~70% of the execution time) ++ $time_limit = $this->_max_sync_lock_time() * 0.7; + +- $this->imap_mode(false); ++ if (time() - $this->sync_start > $time_limit) { ++ return false; ++ } + +- // determine objects to fetch or to invalidate +- if (!$imap_index->is_error()) { +- $imap_index = $imap_index->get(); +- $old_index = array(); +- $del_index = array(); ++ // disable messages cache if configured to do so ++ $this->imap_mode(true); + +- // read cache index +- $sql_result = $this->db->query( +- "SELECT `msguid`, `uid` FROM `{$this->cache_table}` WHERE `folder_id` = ?" +- . " ORDER BY `msguid` DESC", $this->folder_id +- ); ++ // synchronize IMAP mailbox cache, does nothing if messages cache is disabled ++ $this->imap->folder_sync($this->folder->name); + +- while ($sql_arr = $this->db->fetch_assoc($sql_result)) { +- // Mark all duplicates for removal (note sorting order above) +- // Duplicates here should not happen, but they do sometimes +- if (isset($old_index$sql_arr'uid')) { +- $del_index = $sql_arr'msguid'; +- } +- else { +- $old_index$sql_arr'uid' = $sql_arr'msguid'; +- } +- } ++ // compare IMAP index with object cache index ++ $imap_index = $this->imap->index($this->folder->name, null, null, true, true); + +- // fetch new objects from imap +- $i = 0; +- foreach (array_diff($imap_index, $old_index) as $msguid) { +- // Note: We'll store only objects matching the folder type +- // anything else will be silently ignored +- if ($object = $this->folder->read_object($msguid)) { +- // Deduplication: remove older objects with the same UID +- // Here we do not resolve conflicts, we just make sure +- // the most recent version of the object will be used +- if ($old_msguid = $old_index$object'uid') { +- if ($old_msguid < $msguid) { +- $del_index = $old_msguid; +- }
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail-plugins-kolab (1:3.5.5-0~kolab1) unstable; urgency=low + + * Release version 3.5.5 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Fri, 16 Oct 2020 11:11:11 +0200 + roundcubemail-plugins-kolab (1:3.5.4-0~kolab4) unstable; urgency=low * Bump release for rebuild
View file
debian.series
Changed
@@ -1,1 +1,2 @@ roundcubemail-plugins-kolab-3.4-kolab-files-manticore-api.patch -p1 +0001-Fix-kolab-cache-sync-issues.patch -p1
View file
plesk.kolab_chat.inc.php
Changed
@@ -1,5 +1,7 @@ <?php + $config = array(); + if (file_exists(RCUBE_CONFIG_DIR .'/'. $_SERVER'HTTP_HOST' .'/mattermost.inc.php')) { - @include_once(RCUBE_CONFIG_DIR .'/'. $_SERVER'HTTP_HOST' .'/mattermost.inc.php'); + include_once(RCUBE_CONFIG_DIR .'/'. $_SERVER'HTTP_HOST' .'/mattermost.inc.php'); }
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/calendar/composer.json -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/calendar/composer.json
Changed
@@ -4,7 +4,7 @@ "description": "Calendar plugin", "homepage": "https://git.kolab.org/diffusion/RPK/", "license": "AGPLv3", - "version": "3.5.4", + "version": "3.5.5", "authors": { "name": "Thomas Bruederli",
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/calendar/drivers/kolab/kolab_driver.php -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/calendar/drivers/kolab/kolab_driver.php
Changed
@@ -2375,7 +2375,7 @@ if (strlen($folder)) { $path_imap = explode($delim, $folder); array_pop($path_imap); // pop off name part - $path_imap = implode($path_imap, $delim); + $path_imap = implode($delim, $path_imap); $options = $storage->folder_info($folder); }
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/calendar/lib/js/fullcalendar.js -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/calendar/lib/js/fullcalendar.js
Changed
@@ -1,7 +1,7 @@ /*! - * FullCalendar v3.9.0 + * FullCalendar v3.10.2 * Docs & License: https://fullcalendar.io/ - * (c) 2018 Adam Shaw + * (c) 2019 Adam Shaw */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -75,7 +75,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 236); +/******/ return __webpack_require__(__webpack_require__.s = 256); /******/ }) /************************************************************************/ /******/ ( @@ -200,7 +200,7 @@ var naturalOffset = flexOffsetsi; var naturalHeight = flexHeightsi; var newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding - if (naturalOffset < minOffset) { + if (naturalOffset < minOffset) { // we check this again because redistribution might have changed things $(el).height(newHeight); } }); @@ -314,7 +314,7 @@ leftRightWidth = sanitizeScrollbarWidth(leftRightWidth); bottomWidth = sanitizeScrollbarWidth(bottomWidth); widths = { left: 0, right: 0, top: 0, bottom: bottomWidth }; - if (getIsLeftRtlScrollbars() && el.css('direction') === 'rtl') { + if (getIsLeftRtlScrollbars() && el.css('direction') === 'rtl') { // is the scrollbar on the left side? widths.left = leftRightWidth; } else { @@ -339,7 +339,7 @@ return _isLeftRtlScrollbars; } function computeIsLeftRtlScrollbars() { - var el = $('<div><div/></div>') + var el = $('<div><div></div></div>') .css({ position: 'absolute', top: -1000, @@ -577,13 +577,13 @@ // Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling // of month-diffing logic (which tends to vary from version to version). function computeRangeAs(unit, start, end) { - if (end != null) { + if (end != null) { // given start, end return end.diff(start, unit, true); } - else if (moment.isDuration(start)) { + else if (moment.isDuration(start)) { // given duration return start.as(unit); } - else { + else { // given { start, end } range object return start.end.diff(start.start, unit, true); } } @@ -709,7 +709,7 @@ for (i = propObjs.length - 1; i >= 0; i--) { props = propObjsi; for (name in props) { - if (!(name in dest)) { + if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign destname = propsname; } } @@ -747,7 +747,7 @@ var removeCnt = 0; var i = 0; while (i < array.length) { - if (testFunc(arrayi)) { + if (testFunc(arrayi)) { // truthy value means *remove* array.splice(i, 1); removeCnt++; } @@ -776,7 +776,7 @@ function isArraysEqual(a0, a1) { var len = a0.length; var i; - if (len == null || len !== a1.length) { + if (len == null || len !== a1.length) { // not array? or not same length? return false; } for (i = 0; i < len; i++) { @@ -805,7 +805,7 @@ .replace(/>/g, '>') .replace(/'/g, ''') .replace(/"/g, '"') - .replace(/\n/g, '<br />'); + .replace(/\n/g, '<br>'); } exports.htmlEscape = htmlEscape; function stripHtmlEntities(text) { @@ -907,7 +907,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var moment = __webpack_require__(0); -var moment_ext_1 = __webpack_require__(10); +var moment_ext_1 = __webpack_require__(11); var UnzonedRange = /** @class */ (function () { function UnzonedRange(startInput, endInput) { // TODO: move these into footprint. @@ -942,7 +942,7 @@ for (i = 0; i < ranges.length; i++) { dateRange = rangesi; // add the span of time before the event (if there is any) - if (dateRange.startMs > startMs) { + if (dateRange.startMs > startMs) { // compare millisecond time (skip any ambig logic) invertedRanges.push(new UnzonedRange(startMs, dateRange.startMs)); } if (dateRange.endMs > startMs) { @@ -950,7 +950,7 @@ } } // add the span of time after the last event (if there is any) - if (startMs < constraintRange.endMs) { + if (startMs < constraintRange.endMs) { // compare millisecond time (skip any ambig logic) invertedRanges.push(new UnzonedRange(startMs, constraintRange.endMs)); } return invertedRanges; @@ -1058,9 +1058,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var $ = __webpack_require__(3); -var ParsableModelMixin_1 = __webpack_require__(208); -var Class_1 = __webpack_require__(33); -var EventDefParser_1 = __webpack_require__(49); +var ParsableModelMixin_1 = __webpack_require__(52); +var Class_1 = __webpack_require__(35); +var EventDefParser_1 = __webpack_require__(36); var EventSource = /** @class */ (function (_super) { tslib_1.__extends(EventSource, _super); // can we do away with calendar? at least for the abstract? @@ -1189,7 +1189,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(2); var $ = __webpack_require__(3); -var Mixin_1 = __webpack_require__(14); +var Mixin_1 = __webpack_require__(15); var guid = 0; var ListenerMixin = /** @class */ (function (_super) { tslib_1.__extends(ListenerMixin, _super); @@ -1208,7 +1208,7 @@ }) */ ListenerMixin.prototype.listenTo = function (other, arg, callback) { - if (typeof arg === 'object') { + if (typeof arg === 'object') { // given dictionary of callbacks for (var eventName in arg) { if (arg.hasOwnProperty(eventName)) { this.listenTo(other, eventName, argeventName); @@ -1246,8 +1246,76 @@ /***/ }), /* 8 */, -/* 9 */, -/* 10 */ +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = __webpack_require__(2); +var EventDef_1 = __webpack_require__(37); +var EventInstance_1 = __webpack_require__(53); +var EventDateProfile_1 = __webpack_require__(16); +var SingleEventDef = /** @class */ (function (_super) { + tslib_1.__extends(SingleEventDef, _super); + function SingleEventDef() { + return _super !== null && _super.apply(this, arguments) || this; + } + /* + Will receive start/end params, but will be ignored. + */ + SingleEventDef.prototype.buildInstances = function () { + return this.buildInstance(); + }; + SingleEventDef.prototype.buildInstance = function () { + return new EventInstance_1.default(this, // definition + this.dateProfile); + }; + SingleEventDef.prototype.isAllDay = function () { + return this.dateProfile.isAllDay(); + }; + SingleEventDef.prototype.clone = function () { + var def = _super.prototype.clone.call(this); + def.dateProfile = this.dateProfile; + return def; + }; + SingleEventDef.prototype.rezone = function () { + var calendar = this.source.calendar; + var dateProfile = this.dateProfile; + this.dateProfile = new EventDateProfile_1.default(calendar.moment(dateProfile.start), dateProfile.end ? calendar.moment(dateProfile.end) : null, calendar); + }; + /*
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/kolab_addressbook/composer.json -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/kolab_addressbook/composer.json
Changed
@@ -4,7 +4,7 @@ "description": "Kolab addressbook", "homepage": "https://git.kolab.org/diffusion/RPK/", "license": "AGPLv3", - "version": "3.5.2", + "version": "3.5.5", "authors": { "name": "Thomas Bruederli",
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/kolab_addressbook/lib/kolab_addressbook_ui.php
Changed
@@ -183,7 +183,7 @@ if ($action == 'edit') { $path_imap = explode($delim, $folder); $name = rcube_charset::convert(array_pop($path_imap), 'UTF7-IMAP'); - $path_imap = implode($path_imap, $delim); + $path_imap = implode($delim, $path_imap); } else { // create $path_imap = $folder;
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php
Changed
@@ -460,7 +460,7 @@ $scount = count($fields); // build key name regexp - $regexp = '/^(' . implode($fields, '|') . ')(?:.*)$/'; + $regexp = '/^(' . implode('|', $fields) . ')(?:.*)$/'; // pass query to storage if only indexed cols are involved // NOTE: this is only some rough pre-filtering but probably includes false positives
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/kolab_notes/composer.json -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/kolab_notes/composer.json
Changed
@@ -4,7 +4,7 @@ "description": "Notes module for Roundcube connecting to a Kolab server for storage", "homepage": "https://git.kolab.org/diffusion/RPK/", "license": "AGPLv3", - "version": "3.5.2", + "version": "3.5.5", "authors": { "name": "Thomas Bruederli",
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/kolab_notes/kolab_notes_ui.php -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/kolab_notes/kolab_notes_ui.php
Changed
@@ -306,7 +306,7 @@ $path_imap = explode($delim, $folder_name); array_pop($path_imap); // pop off name part - $path_imap = implode($path_imap, $delim); + $path_imap = implode($delim, $path_imap); } else { $path_imap = '';
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/libkolab/bin/modcache.sh -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/libkolab/bin/modcache.sh
Changed
@@ -23,12 +23,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define('INSTALL_PATH', realpath('.') . '/' ); +define('INSTALL_PATH', __DIR__ . '/../../../'); ini_set('display_errors', 1); -if (!file_exists(INSTALL_PATH . 'program/include/clisetup.php')) - die("Execute this from the Roundcube installation dir!\n\n"); - require_once INSTALL_PATH . 'program/include/clisetup.php'; function print_usage() @@ -58,6 +55,10 @@ $rcmail = rcube::get_instance(rcube::INIT_WITH_DB | rcube::INIT_WITH_PLUGINS); +// Make --host argument optional where the default_host is a simple string +if (empty($opts'host')) { + $opts'host' = imap_host(); +} // connect to database $db = $rcmail->get_dbh(); @@ -236,3 +237,23 @@ return $auth'valid'; } +function imap_host() +{ + global $rcmail; + + $default_host = $rcmail->config->get('default_host'); + + if (is_array($default_host)) { + $key = key($default_host); + $imap_host = is_numeric($key) ? $default_host$key : $key; + } + else { + $imap_host = $default_host; + } + + // strip protocol prefix + $uri = parse_url($imap_host); + if (!empty($uri'host')) { + return $uri'host'; + } +}
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/libkolab/bin/randomcontacts.sh -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/libkolab/bin/randomcontacts.sh
Changed
@@ -23,18 +23,15 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define('INSTALL_PATH', realpath('.') . '/' ); +define('INSTALL_PATH', __DIR__ . '/../../../'); ini_set('display_errors', 1); -if (!file_exists(INSTALL_PATH . 'program/include/clisetup.php')) - die("Execute this from the Roundcube installation dir!\n\n"); - require_once INSTALL_PATH . 'program/include/clisetup.php'; function print_usage() { print "Usage: randomcontacts.sh OPTIONS USERNAME FOLDER\n"; - print "Create random contact that for then given user in the specified folder.\n"; + print "Create random contact for a given user in a specified folder.\n"; print "-n, --num Number of contacts to be created, defaults to 50\n"; print "-h, --host IMAP host name\n"; print "-p, --password IMAP user password\n"; @@ -56,11 +53,8 @@ $rcmail->plugins->load_plugins(array('libkolab')); ini_set('display_errors', 1); - if (empty($opts'host')) { - $opts'host' = $rcmail->config->get('default_host'); - if (is_array($opts'host')) // not unique - $opts'host' = null; + $opts'host' = imap_host(); } if (empty($opts'username') || empty($opts'folder') || empty($opts'host')) { @@ -179,3 +173,24 @@ return rtrim($str); } + +function imap_host() +{ + global $rcmail; + + $default_host = $rcmail->config->get('default_host'); + + if (is_array($default_host)) { + $key = key($default_host); + $imap_host = is_numeric($key) ? $default_host$key : $key; + } + else { + $imap_host = $default_host; + } + + // strip protocol prefix + $uri = parse_url($imap_host); + if (!empty($uri'host')) { + return $uri'host'; + } +}
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/libkolab/bin/readcache.sh -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/libkolab/bin/readcache.sh
Changed
@@ -22,13 +22,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define('INSTALL_PATH', realpath('.') . '/' ); +define('INSTALL_PATH', __DIR__ . '/../../../'); ini_set('display_errors', 1); libxml_use_internal_errors(true); -if (!file_exists(INSTALL_PATH . 'program/include/clisetup.php')) - die("Execute this from the Roundcube installation dir!\n\n"); - require_once INSTALL_PATH . 'program/include/clisetup.php'; function print_usage() @@ -51,17 +48,7 @@ $rcmail = rcube::get_instance(rcube::INIT_WITH_DB | rcube::INIT_WITH_PLUGINS); if (empty($imap_host)) { - $default_host = $rcmail->config->get('default_host'); - if (is_array($default_host)) { - list($k,$v) = each($default_host); - $imap_host = is_numeric($k) ? $v : $k; - } - else { - $imap_host = $default_host; - } - - // strip protocol prefix - $imap_host = preg_replace('!^a-z+://!', '', $imap_host); + $imap_host = imap_host(); } if (empty($folder) || empty($imap_host)) { @@ -72,8 +59,9 @@ // connect to database $db = $rcmail->get_dbh(); $db->db_connect('r'); -if (!$db->is_connected() || $db->is_error()) +if (!$db->is_connected() || $db->is_error()) { die("No DB connection\n"); +} // resolve folder_id @@ -118,11 +106,13 @@ $extra_cols_ = $extra_cols$folder_data'type' ?: array(); $sql_arr = $db->fetch_assoc($db->query("SELECT COUNT(*) as cnt FROM `$cache_table` WHERE `folder_id`=?", intval($folder_id))); -print "CTag = " . $folder_data'ctag' . "\n"; -print "Lock = " . $folder_data'synclock' . "\n"; -print "Count = " . $sql_arr'cnt' . "\n"; +print "CTag = " . $folder_data'ctag' . "\n"; +print "Lock = " . $folder_data'synclock' . "\n"; +print "Changed = " . $folder_data'changed' . "\n"; +print "ObjCount = " . $folder_data'objectcount' . "\n"; +print "Count = " . $sql_arr'cnt' . "\n"; print "----------------------------------------------------------------------------------\n"; -print "<MSG>\t<UUID>\t<CHANGED>\t<DATA>\t<XML>\t"; +print "<MSG>\t<UUID>\t<CHANGED>\t<DATA>\t"; print join("\t", array_map(function($c) { return '<' . strtoupper($c) . '>'; }, $extra_cols_)); print "\n----------------------------------------------------------------------------------\n"; @@ -131,12 +121,8 @@ print $sql_arr'msguid' . "\t" . $sql_arr'uid' . "\t" . $sql_arr'changed'; // try to unserialize data block - $object = @unserialize(@base64_decode($sql_arr'data')); - print "\t" . ($object === false ? 'FAIL!' : ($object'uid' == $sql_arr'uid' ? 'OK' : '!!!')); - - // check XML validity - $xml = simplexml_load_string($sql_arr'xml'); - print "\t" . ($xml === false ? 'FAIL!' : 'OK'); + $object = json_decode($sql_arr'data'); + print "\t" . ($object === false ? 'FAIL!' : 'OK'); // print extra cols array_walk($extra_cols_, function($c) use ($sql_arr) { @@ -148,3 +134,25 @@ print "----------------------------------------------------------------------------------\n"; echo "Done.\n"; + + +function imap_host() +{ + global $rcmail; + + $default_host = $rcmail->config->get('default_host'); + + if (is_array($default_host)) { + $key = key($default_host); + $imap_host = is_numeric($key) ? $default_host$key : $key; + } + else { + $imap_host = $default_host; + } + + // strip protocol prefix + $uri = parse_url($imap_host); + if (!empty($uri'host')) { + return $uri'host'; + } +}
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/libkolab/composer.json -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/libkolab/composer.json
Changed
@@ -4,7 +4,7 @@ "description": "Plugin to setup a basic environment for the interaction with a Kolab server.", "homepage": "https://git.kolab.org/diffusion/RPK/", "license": "AGPLv3", - "version": "3.5.4", + "version": "3.5.5", "authors": { "name": "Thomas Bruederli",
View file
roundcubemail-plugins-kolab-3.5.4.tar.gz/plugins/libkolab/lib/kolab_storage.php -> roundcubemail-plugins-kolab-3.5.5.tar.gz/plugins/libkolab/lib/kolab_storage.php
Changed
@@ -1371,8 +1371,8 @@ self::$subscriptions = self::$imap->list_folders_subscribed(); self::$with_tempsubs = true; } - self::$states = self::$subscriptions; - $folders = implode(self::$states, '**'); + self::$states = (array) self::$subscriptions; + $folders = implode('**', self::$states); $rcube->user->save_prefs(array('kolab_active_folders' => $folders)); } @@ -1396,9 +1396,9 @@ } // update user preferences - $folders = implode(self::$states, '**'); - $rcube = rcube::get_instance(); - return $rcube->user->save_prefs(array('kolab_active_folders' => $folders)); + $folders = implode('**', self::$states); + + return rcube::get_instance()->user->save_prefs(array('kolab_active_folders' => $folders)); } /**
View file
roundcubemail-plugins-kolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail-plugins-kolab Binary: roundcubemail-plugins-kolab Architecture: all -Version: 1:3.5.4-0~kolab4 +Version: 1:3.5.5-0~kolab1 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Standards-Version: 3.9.3 @@ -37,5 +37,5 @@ roundcubemail-plugin-tinymce-config deb web extra roundcubemail-plugin-wap-client deb web extra Files: - 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.5.4.tar.gz + 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.5.5.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.