From a3accd7a77700eed35400fb4e74066bf442b102a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=BCegg?= Date: Thu, 12 Feb 2015 20:08:18 +0100 Subject: [PATCH] don't check for a photo unless any phone number given since the identification / matching between contact and sms is the sms_address (which is compared with TEL entries) it makes no sense to check for the photo, unless there is at least one address given (the sms_address can also be a text string, but this would still match only in TEL entries). --- appinfo/ocsmsapp.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appinfo/ocsmsapp.php b/appinfo/ocsmsapp.php index 9932f00..5a5866b 100644 --- a/appinfo/ocsmsapp.php +++ b/appinfo/ocsmsapp.php @@ -145,12 +145,12 @@ class OcSmsApp extends App { else { $this->pushPhoneNumberToCache($phoneIds, $r["FN"], $configuredCountry); } - } - - if (isset ($r["PHOTO"])) { - // Remove useless prefix - $photoURL = preg_replace("#VALUE=uri:#","",$r["PHOTO"]); - self::$contactPhotos[$r["FN"]] = $photoURL; + + if (isset ($r["PHOTO"])) { + // Remove useless prefix + $photoURL = preg_replace("#VALUE=uri:#","",$r["PHOTO"]); + self::$contactPhotos[$r["FN"]] = $photoURL; + } } } }