summaryrefslogtreecommitdiff
path: root/lib/kolab_sync_backend.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-02-04 17:00:44 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-02-04 17:00:44 (GMT)
commit9ec1afd0a0c349a8a2c782f79ba97a84d3bcaeeb (patch)
tree2815b3f34c7f99ce8fe329cf0800cb3d3ce02d5b /lib/kolab_sync_backend.php
parente74dd441e5c64ea4dcd2db83f39b56f9ec1d1bfa (diff)
downloadkolab-syncroton-9ec1afd0a0c349a8a2c782f79ba97a84d3bcaeeb.tar.gz
Handle kolab_storage errors correctly (#4418)
As we already found out (in #4378) kolab_storage did't prevent from sql errors if some imap connection error happened. This is already fixed, however syncroton need to use 'valid' flag implemented in kolab_storage_folder to pass correct error codes to activesync client and to prevent from more issues.
Diffstat (limited to 'lib/kolab_sync_backend.php')
-rw-r--r--lib/kolab_sync_backend.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/kolab_sync_backend.php b/lib/kolab_sync_backend.php
index 56a411d..a1c24a8 100644
--- a/lib/kolab_sync_backend.php
+++ b/lib/kolab_sync_backend.php
@@ -790,7 +790,7 @@ class kolab_sync_backend
// get all folders of specified type
$folderdata = $this->folder_meta();
- if (!is_array($folderdata)) {
+ if (!is_array($folderdata) || $id === null) {
return null;
}
@@ -802,10 +802,11 @@ class kolab_sync_backend
continue;
}
- $uid = self::folder_id($folder);
- $this->folder_uids[$folder] = $uid;
+ if ($uid = self::folder_id($folder)) {
+ $this->folder_uids[$folder] = $uid;
+ }
- if ($uid == $id) {
+ if ($uid === $id) {
$name = $folder;
}
}