Reset cached properties when iterating folders using the same kolab_storage_folder instance

This commit is contained in:
Thomas Bruederli 2014-06-26 09:58:48 +02:00
parent 32164e30bf
commit 645d06be5e

View file

@ -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);