1
0
mirror of https://github.com/nextcloud/ocsms.git synced 2026-08-11 16:32:55 +00:00

Merge pull request #46 from martin-rueegg/patch-2

Speed improvements in contact photo check
This commit is contained in:
Ner'zhul
2015-02-12 21:01:54 +01:00
+6 -6
View File
@@ -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"], 1);
self::$contactPhotos[$r["FN"]] = $photoURL;
}
}
}
}