summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-12-01 19:42:51 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-12-01 19:42:51 +0000
commitca0797a8ec34da6e5f3c874da863cd2ec1367f82 (patch)
tree28dd18236154790a90b8a4fc3a391e0b51c67fbf
parentb1ec2ec22bb454971fde85404b9074dbffd01efa (diff)
Show photo of a Kolab contact
git-svn-id: https://svn.roundcube.net/trunk@4299 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--plugins/kolab_addressbook/rcube_kolab_contacts.php6
1 files changed, 6 insertions, 0 deletions
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);