1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-18 13:26:14 +00:00

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
This commit is contained in:
Martin Rüegg 2015-02-12 20:14:18 +01:00
parent a3accd7a77
commit 822f969afc

View File

@ -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;
}
}