1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Fix thumbnail caching

This commit is contained in:
Thomas Tanghus 2014-03-22 21:19:59 +01:00
parent c90413f24b
commit 2aa97eeece

View File

@ -288,7 +288,8 @@ Class Properties {
}
public static function cacheThumbnail($backendName, $addressBookId, $contactId,
\OCP\Image $image = null, \OCA\VObject\VCard $vcard = null, $options = array()) {
\OCP\Image $image = null, $vcard = null, $options = array()
) {
$cache = \OC::$server->getCache();
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
//$cache->remove($key);
@ -309,12 +310,12 @@ Class Properties {
if (is_null($vcard)) {
$app = new App();
$vcard = $app->getContact($backendName, $addressBookId, $contactId);
}
$image = $vcard->getPhoto();
if (is_null($image)) {
return false;
}
}
}
if (!$image->centerCrop()) {
\OCP\Util::writeLog('contacts',