From 384948886c4a1bedb17318af63c944c33ae0b3b6 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 13 Jul 2012 20:16:52 +0200 Subject: Prepare to show contact photo of email sender in mail views --- program/steps/addressbook/func.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'program/steps/addressbook/func.inc') 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)); -- cgit v1.2.3