Commit graph

136 commits

Author SHA1 Message Date
Aleksander Machniak
5eb91ca74a PHPStan level:2 fixes (partial) 2024-01-25 13:47:41 +01:00
Aleksander Machniak
5271b6e787 Use consistent PHP code style 2024-01-24 11:24:41 +01:00
Aleksander Machniak
f3319891d5 PHPStan Level:1 fixes, also fixed tests 2024-01-24 10:59:25 +01:00
Aleksander Machniak
7aa7a9fe5b PHPDoc fixes 2024-01-19 16:05:37 +01:00
Aleksander Machniak
b258585da1 Improve "empty" _sync_unlock() 2024-01-10 15:56:22 +01:00
Aleksander Machniak
9c69920ccb Fix handling errors on FETCH in the cache synchronization, code cleanup 2024-01-10 14:32:03 +01:00
Aleksander Machniak
737f4c119e Small improvements in DAV handler 2024-01-04 09:47:07 +01:00
Aleksander Machniak
99717b0877 Calendar: Fix restoring an event (or event occurrence) in the Kolab driver (T854626) 2023-08-03 14:12:27 +02:00
Aleksander Machniak
f70c6d3508 Fix cache issue with handling more than 500 records 2023-05-03 10:31:53 +02:00
Christian Mollekopf
f3592eaf3b Always fetch the full result in kolab_storage_cache::select
The previous behaviour did not work in the addressbook if more than 500
results were provided, because nothing turned the uid only fetch into
the full data, resulting in "empty" result records.
This solution seems to work fine for the cases tested and avoids having
to completely different codepaths based on a number of records found.
2023-05-03 09:25:49 +02:00
Aleksander Machniak
68eaf60aca Fix moving objects between DAV folders
The code does "move object then read it" and "read it" was failing
because the folder cache wasn't up-to-date. We force re-synchronization
by reseting the state properly after move().
2023-05-01 12:11:33 +02:00
Aleksander Machniak
7810d77969 PHP8 fixes - code style 2023-01-18 16:38:22 +01:00
Christian Mollekopf
d988dac141 PHP 8 fixes
Differential Revision: https://git.kolab.org/D3995
2023-01-18 14:50:31 +01:00
Aleksander Machniak
a3ef1eedf1 CalDAV driver for Tasks
includes cache syncronization fixes and PHP8 fixes.
2023-01-03 10:42:54 +01:00
Aleksander Machniak
0530881f4b Remove dependency on kolabcalendaring/kolabformat in CalDAV driver, various PHP8 support fixes 2022-12-05 15:07:23 +01:00
Aleksander Machniak
f5d95d5a92 Use Sabre/VObject v4, Partial PHP8 support 2022-11-29 15:54:43 +01:00
Aleksander Machniak
af5461eb76 CalDAV driver 2022-10-06 15:59:53 +02:00
Aleksander Machniak
f8ba2e6fc7 Fix kolab cache sync issues
Summary: Use QRESYNC, get rid of "scheduled" cache reset, other small improvements

Reviewers: #roundcube_kolab_plugins_developers, vanmeeuwen

Reviewed By: #roundcube_kolab_plugins_developers, vanmeeuwen

Subscribers: vanmeeuwen, #roundcube_kolab_plugins_developers

Differential Revision: https://git.kolab.org/D1726
2020-11-20 10:36:10 +01:00
Aleksander Machniak
4136938a7a Don't store invalid objects in cache
For example, before the change it was possible to end up with
a task object in a calendar folder cache.
2019-05-16 08:33:27 +00:00
Aleksander Machniak
e848de3129 Use INSERT ... ON DUPLICATE KEY UPDATE in kolab cache
Bifrost#T61987
2018-12-28 14:13:25 +00:00
Aleksander Machniak
47f7793ac0 Slim down kolab cache (drop xml column, change data format) (Bifrost#T61991) 2018-12-27 14:26:35 +00:00
Aleksander Machniak
a90d4c6015 Fast-mode for events/tasks/contacts and some code improvements 2018-12-21 12:23:41 +01:00
Aleksander Machniak
28932e4c92 Fast-mode for selecting kolab objects
... for now used only by kolab_notes plugin
2018-12-13 18:36:17 +00:00
Aleksander Machniak
be749b2795 Add possibility to bypass indexes cache only 2018-12-13 16:27:06 +00:00
Aleksander Machniak
67f6ef9bbf Always fetch xml from IMAP and parse objects on select
Temporarily we still store data and xml as before, but do not use them on select.
2018-12-19 12:25:39 +01:00
Aleksander Machniak
011fa7949d Add support for prefix search in kolab cache 2017-07-19 12:54:47 +02:00
Aleksander Machniak
45ce87f545 Remove duplicates on cache synchronization.
https://issues.kolab.org/show_bug.cgi?id=4067 and (Bifrost#TT20881)

It happens that IMAP folder may contain many objects with the same UID.
The precise reason for this is unknown, but it can be e.g. a faulty
client or an error between "create a new object instance" and "remove the
old one". It causes various issues when editing such objects.

With the change we assume that the most recent object (with max. IMAP UID)
is the one that should be used and all the older instances will be removed
automatically.
2017-02-16 12:49:11 +01:00
Aleksander Machniak
d6ea9104ba Fix "unknown" dates in event dialog (Bifrost#T21544) 2017-01-20 10:38:21 +01:00
Aleksander Machniak
9d883ed07d Properly set skip_deleted and threading on Kolab storage IMAP operations (T1145)
Summary:
Fixes race-conditions between Kolab folders and Roundcube core
where skip_deleted/threading could be set for operations outside
of Kolab plugins, causing e.g. inability to see \Deleted messages.

Fixes T1145.

Reviewers: #roundcube_kolab_plugins_developers, vanmeeuwen

Reviewed By: #roundcube_kolab_plugins_developers, vanmeeuwen

Maniphest Tasks: T1145

Differential Revision: https://git.kolab.org/D112
2016-04-14 11:42:00 +02:00
Aleksander Machniak
9daf32495a Fix regression in get_object() (T1098)
Also remove the second argument as it was useless.
2016-03-07 17:54:01 +01:00
Aleksander Machniak
6c25221b95 Performance: Make objects moving faster (less SQL and less IMAP operations) using COPYUID 2016-02-24 13:57:58 +01:00
Aleksander Machniak
11ce37ef17 Performance: Limit number of SQL queries when "attaching" relations/tags to list of tasks/notes (#3969) 2016-02-13 17:35:29 +01:00
Aleksander Machniak
52053f355a Performance: Optimize kolab_storage_folder::get_object() to use one sql query instead of two
Before the change to get an object by UID we first resolve UID to IMAP-UID
and then fetch the object data by IMAP-UID - two select queries. Now we
directly select the data by UID.
2016-02-13 11:33:01 +01:00
Aleksander Machniak
d2f74ee9fa Performance: Skip SELECT query if we already know it will return no records (from previous SELECT COUNT(*)) 2015-08-27 14:13:36 +02:00
Aleksander Machniak
a0ca17fb36 Fix missing events on edges of the view time range (when client timezone is different than server tz) (T698) 2015-08-18 12:39:55 +02:00
Thomas Bruederli
39449c11ce Improve groupware object cache synchronization (#3933):
- store and compare the number of objects stored after last sync
- use a (configurable) refresh interval and periodically force re-sync

ATTENTION: requires database schema updates
2015-02-05 15:27:28 +01:00
Thomas Bruederli
29645a4736 Fix db table reference; forward constructor argument (#4471) 2015-02-03 17:26:03 +01:00
Thomas Bruederli
948a68136d Handle possible errors from kolab_storage::get_folder() access (#4378) 2015-02-03 16:30:02 +01:00
Thomas Bruederli
5982ce8732 Add error checking/reporting facilities to kolab_storage_folder instances (#4378) 2015-02-03 13:15:56 +01:00
Thomas Bruederli
038e269d51 Check (expected) folder type and disable access to folder contents or cache if invalid (#4378) 2015-01-29 16:48:42 +01:00
Thomas Bruederli
af216b50e3 Improve sync lock setting/reading to avoid race conditions (#4316) 2015-01-23 14:43:45 +01:00
Aleksander Machniak
bfe6de5b54 Remove redundant updating of uid2msg map in synchronize() 2015-01-12 10:30:50 +01:00
Aleksander Machniak
ac4f6e7562 Avoid unused variables (also fixed some bugs) found in static code analysis 2014-11-21 10:03:18 +01:00
Thomas Bruederli
8627b72357 Avoid hitting executing time limit when synchronizing cache (#3677):
This change will make the synchronization process abort before the time limit is reached.
The folder is not flagged as fully synchronized and subsequent requests will continue the synchronization.
Application scripts can read the public 'sync_complete' property and initiate a next sync request.
2014-11-04 13:04:57 +01:00
Thomas Bruederli
a3d5f717a2 Fix moving events to another calendar/folder and reloading it (#3748) 2014-10-09 16:37:31 +02:00
Aleksander Machniak
fbe1759c00 Skip multifolder insert for Oracle, we can't put long data inline 2014-09-18 15:24:16 +02:00
Aleksander Machniak
e9e871a43f Quote columns in ORDER BY 2014-09-17 19:50:26 +02:00
Aleksander Machniak
9e49c5c83b Quote also column aliases in sql tables, otherwise they will be returned uppercase in Oracle 2014-09-17 18:06:17 +02:00
Aleksander Machniak
788635b287 Use consistent column/table quoting in sql queries 2014-09-15 12:23:46 +02:00
Thomas Bruederli
54b6eb66de Post-filter all tag objects (in case caching is disabled); improve kolab_storage_cache for the case caching is off 2014-08-26 12:03:11 +02:00