Add type argument to get_object() - when you fetch object by uid
and it's type is different than folder type (e.g. distribution-list) it need to be specified here.
This commit is contained in:
parent
2cbe93a0c9
commit
aea5e2009c
1 changed files with 8 additions and 3 deletions
|
@ -412,17 +412,22 @@ class kolab_storage_folder
|
|||
/**
|
||||
* Getter for a single Kolab object, identified by its UID
|
||||
*
|
||||
* @param string Object UID
|
||||
* @param string $uid Object UID
|
||||
* @param string $type Object type (e.g. contact, event, todo, journal, note, configuration)
|
||||
* Defaults to folder type
|
||||
*
|
||||
* @return array The Kolab object represented as hash array
|
||||
*/
|
||||
public function get_object($uid)
|
||||
public function get_object($uid, $type = null)
|
||||
{
|
||||
// synchronize caches
|
||||
$this->cache->synchronize();
|
||||
|
||||
$msguid = $this->cache->uid2msguid($uid);
|
||||
if ($msguid && ($object = $this->cache->get($msguid, '*')))
|
||||
|
||||
if ($msguid && ($object = $this->cache->get($msguid, $type))) {
|
||||
return $object;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue