summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-07-13 20:16:52 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-07-13 20:16:52 +0200
commit384948886c4a1bedb17318af63c944c33ae0b3b6 (patch)
tree66f7a0fb29be3070dda9434c68097b22ec8be905 /program/steps/addressbook/func.inc
parent88fb5635109ff5ed994aa5624c0bc1a95c814176 (diff)
Prepare to show contact photo of email sender in mail views
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 80d89b001..a612d7c11 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -709,7 +709,11 @@ function rcmail_contact_photo($attrib)
$RCMAIL->output->set_env('photo_placeholder', $photo_img);
unset($attrib['placeholder']);
- if (preg_match('!^https?://!i', $record['photo']))
+ $plugin = $RCMAIL->plugins->exec_hook('contact_photo', array('record' => $record, 'data' => $record['photo']));
+
+ if ($plugin['url'])
+ $photo_img = $plugin['url'];
+ else if (preg_match('!^https?://!i', $record['photo']))
$photo_img = $record['photo'];
else if ($record['photo'])
$photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $SOURCE_ID));