From 6a6168619a2d538263eb99247b18154a72e5e298 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 25 Nov 2011 13:50:05 -0500
Subject: [PATCH] - Fix handling contact photo url with https:// prefix (#1488202)
---
CHANGELOG | 1 +
program/steps/addressbook/func.inc | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 2426591..22163d9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix handling contact photo url with https:// prefix (#1488202)
- Prevent from memory_limit exceeding when trying to parse big messages bodies (#1487424)
- Add possibility to add SASL mechanisms for SMTP in smtp_connect hook (#1487937)
- Mark (with different color) folders with recent messages (#1486234)
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 52819c0..5010e8c 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -710,7 +710,7 @@
$RCMAIL->output->set_env('photo_placeholder', $photo_img);
unset($attrib['placeholder']);
- if (strpos($record['photo'], 'http:') === 0)
+ 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));
--
Gitblit v1.9.1