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

Fix avatars in contact list

This commit is contained in:
Loic Blot
2016-09-19 22:25:21 +02:00
parent 6c37d0ccfe
commit b9fba16893
3 changed files with 6 additions and 16 deletions
+1 -7
View File
@@ -93,15 +93,9 @@ class ContactCache {
if (isset ($r["PHOTO"])) {
// Remove useless prefix
// @TODO detect owncloud version
$ocversion = \OCP\Util::getVersion();
$photoURL = preg_replace("#^VALUE=uri:#","",$r["PHOTO"], 1);
if (version_compare($ocversion[0].".".$ocversion[1].".".$ocversion[2], "9.0.0", ">=")) {
$this->contactPhotos[$r["FN"]] = base64_encode($photoURL);
}
else {
$this->contactPhotos[$r["FN"]] = $photoURL;
}
$this->contactPhotos[$r["FN"]] = $photoURL;
}
}
}