summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-01 12:49:37 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-01 12:52:33 +0200
commit1fac787d2cedc2ada103418bf91895b3edf1dd8f (patch)
treefa809234923c7ceb849bc7348b3bb31a8224dbbc /program/steps/addressbook/func.inc
parentd1749659d25c5b68600aef3557284cedff8dded1 (diff)
Fix various iCloud vCard issues, added fallback for external photos (#1489993)
Conflicts: program/steps/addressbook/func.inc
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 25dfa9009..2989dada2 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -799,11 +799,15 @@ function rcmail_contact_photo($attrib)
}
$photo_img = $RCMAIL->url($url);
}
- else
+ else {
$ff_value = '-del-'; // will disable delete-photo action
+ }
- $img = html::img(array('src' => $photo_img, 'border' => 1, 'alt' => ''));
- $content = html::div($attrib, $img);
+ $content = html::div($attrib, html::img(array(
+ 'src' => $photo_img,
+ 'alt' => '',
+ 'onerror' => 'this.src = rcmail.env.photo_placeholder',
+ )));
if ($CONTACT_COLTYPES['photo'] && ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add')) {
$RCMAIL->output->add_gui_object('contactphoto', $attrib['id']);