if (isset($params['attributes'])) {
$options['attributes'] = $params['attributes'];
} else {
- $options['attributes'] = $vars['_supported_attributes'];
+ $options['attributes'] = $this->getAttributes($type);
}
$data = $this->search($filter, $options, $base);
protected function _get($attr, $single = true)
{
if (isset($this->_cache[$attr])) {
- if ($single && is_array($this->_cache[$attr])) {
+ if (empty($this->_cache[$attr])) {
+ return false;
+ } else if ($single && is_array($this->_cache[$attr])) {
return $this->_cache[$attr][0];
} else {
return $this->_cache[$attr];
case self::ATTRIBUTE_VISIBILITY:
//FIXME: This needs structural knowledge and should be in a
//structural class.
- return strpos($this->_uid, 'cn=internal') === false;
+ return strpos($this->uid, 'cn=internal') === false;
default:
return parent::derive($attr);
}
// FIXME: This does not work yet, as we still have a number of
// static methods in basic Horde libraries that are not
// declared as such.
- //error_reporting(E_ALL | E_STRICT);
+ error_reporting(E_ALL | E_STRICT);
$suite = new PHPUnit_Framework_TestSuite('Horde Framework - Kolab_Server');
$user = $this->server->fetch('cn=Gunnar Wrobel,dc=example,dc=org');
$attr = $user->get(Horde_Kolab_Server_Object_Kolab_User::ATTRIBUTE_FREEBUSYHOST);
- if (is_a($attr, 'PEAR_Error')) {
- $this->assertEquals('', $attr->getMessage());
- }
$this->assertEquals('https://fb.example.org/freebusy', $attr);
$imap = $user->getServer('freebusy');