summaryrefslogtreecommitdiff
path: root/lib/Kolab/CardDAV/ContactsBackend.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-12 16:14:17 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-13 09:19:47 (GMT)
commit4c27c1607e81d3b98c67656fee99c01edc4c025f (patch)
treed24c8ee150c01331208b932b28bba3a02acc657f /lib/Kolab/CardDAV/ContactsBackend.php
parent09d660c042449c8e157e56a7ffdbe9168ae32a90 (diff)
downloadiRony-4c27c1607e81d3b98c67656fee99c01edc4c025f.tar.gz
Optionally cache LDAP directory listing and record payloads
Diffstat (limited to 'lib/Kolab/CardDAV/ContactsBackend.php')
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index 5ce2be7..b9f0ff8 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -39,6 +39,8 @@ use Kolab\Utils\VObjectUtils;
*/
class ContactsBackend extends CardDAV\Backend\AbstractBackend
{
+ public $ldap_directory;
+
private $sources;
private $folders;
private $aliases;
@@ -303,6 +305,12 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
if ($addressBookId == '__all__') {
$contact = $this->get_card_by_uid($uid, $storage);
}
+ // read card data from LDAP directory
+ else if ($addressBookId == LDAPDirectory::DIRECTORY_NAME) {
+ if (is_object($this->ldap_directory)) {
+ $contact = $this->ldap_directory->getContactObject($uid);
+ }
+ }
else {
$storage = $this->get_storage_folder($addressBookId);
$contact = $storage->get_object($uid, '*');