Fix get_objects() when called with no argument, folder type is used
This commit is contained in:
parent
d67a7f0d76
commit
e8f2cd98a3
1 changed files with 2 additions and 2 deletions
|
@ -384,7 +384,7 @@ class kolab_storage_folder
|
|||
$this->cache->synchronize();
|
||||
|
||||
// fetch objects from cache
|
||||
return $this->cache->select(array());
|
||||
return $this->cache->select($this->_prepare_query($type));
|
||||
}
|
||||
|
||||
|
||||
|
@ -433,7 +433,7 @@ class kolab_storage_folder
|
|||
// string equals type query
|
||||
// FIXME: should not be called this way!
|
||||
if (is_string($query)) {
|
||||
return $this->cache->has_type_col() ? array(array('type','=',$query)) : array();
|
||||
return $this->cache->has_type_col() && !empty($type) ? array(array('type','=',$query)) : array();
|
||||
}
|
||||
|
||||
foreach ((array)$query as $i => $param) {
|
||||
|
|
Loading…
Add table
Reference in a new issue