From ca0797a8ec34da6e5f3c874da863cd2ec1367f82 Mon Sep 17 00:00:00 2001 From: thomasb Date: Wed, 1 Dec 2010 19:42:51 +0000 Subject: Show photo of a Kolab contact git-svn-id: https://svn.roundcube.net/trunk@4299 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/kolab_addressbook/rcube_kolab_contacts.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/kolab_addressbook/rcube_kolab_contacts.php b/plugins/kolab_addressbook/rcube_kolab_contacts.php index 5e5646e68..d23e3db7a 100644 --- a/plugins/kolab_addressbook/rcube_kolab_contacts.php +++ b/plugins/kolab_addressbook/rcube_kolab_contacts.php @@ -37,6 +37,7 @@ class rcube_kolab_contacts extends rcube_addressbook 'anniversary' => array('type' => 'date', 'size' => 12, 'limit' => 1, 'label' => 'kolab_addressbook.anniversary'), // TODO: define more Kolab-specific fields such as: office-location, profession, manager-name, assistant, spouse-name, children, language, latitude, longitude, pgp-publickey, free-busy-url 'notes' => array(), + 'photo' => array(), ); private $gid; @@ -754,6 +755,11 @@ class rcube_kolab_contacts extends rcube_addressbook ); } } + + // photo is stored as separate attachment + if ($record['picture'] && ($att = $record['_attachments'][$record['picture']])) { + $out['photo'] = $this->contactstorage->getAttachment($att['key']); + } // remove empty fields return array_filter($out); -- cgit v1.2.3