From 645d06be5e07ded94a56c4c499fb5b677d2d9e7f Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 26 Jun 2014 09:58:48 +0200 Subject: [PATCH] Reset cached properties when iterating folders using the same kolab_storage_folder instance --- plugins/libkolab/lib/kolab_storage_folder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php index db1a7612..fe0f0f30 100644 --- a/plugins/libkolab/lib/kolab_storage_folder.php +++ b/plugins/libkolab/lib/kolab_storage_folder.php @@ -59,9 +59,11 @@ class kolab_storage_folder extends kolab_storage_folder_api list($this->type, $suffix) = explode('.', $this->type_annotation); $this->default = $suffix == 'default'; $this->name = $name; - $this->resource_uri = null; $this->id = kolab_storage::folder_id($name); + // reset cached object properties + $this->owner = $this->namespace = $this->resource_uri = $this->info = $this->idata = null; + // get a new cache instance of folder type changed if (!$this->cache || $type != $oldtype) $this->cache = kolab_storage_cache::factory($this);