From 822f969afcf3ccf7932ceb02b48de94b6682a8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=BCegg?= Date: Thu, 12 Feb 2015 20:14:18 +0100 Subject: [PATCH] minor regex optimization probably not really neccessary but it was ment to improve speed since the replacment only takes place - at the beginning of the string - once --- appinfo/ocsmsapp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/ocsmsapp.php b/appinfo/ocsmsapp.php index 5a5866b..ad5a16e 100644 --- a/appinfo/ocsmsapp.php +++ b/appinfo/ocsmsapp.php @@ -148,7 +148,7 @@ class OcSmsApp extends App { if (isset ($r["PHOTO"])) { // Remove useless prefix - $photoURL = preg_replace("#VALUE=uri:#","",$r["PHOTO"]); + $photoURL = preg_replace("#^VALUE=uri:#","",$r["PHOTO"], 1); self::$contactPhotos[$r["FN"]] = $photoURL; } }