mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-02 14:24:10 +01:00
Fix thumbnail caching
This commit is contained in:
parent
c90413f24b
commit
2aa97eeece
@ -288,7 +288,8 @@ Class Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function cacheThumbnail($backendName, $addressBookId, $contactId,
|
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();
|
$cache = \OC::$server->getCache();
|
||||||
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
|
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
|
||||||
//$cache->remove($key);
|
//$cache->remove($key);
|
||||||
@ -309,12 +310,12 @@ Class Properties {
|
|||||||
if (is_null($vcard)) {
|
if (is_null($vcard)) {
|
||||||
$app = new App();
|
$app = new App();
|
||||||
$vcard = $app->getContact($backendName, $addressBookId, $contactId);
|
$vcard = $app->getContact($backendName, $addressBookId, $contactId);
|
||||||
|
}
|
||||||
$image = $vcard->getPhoto();
|
$image = $vcard->getPhoto();
|
||||||
if (is_null($image)) {
|
if (is_null($image)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$image->centerCrop()) {
|
if (!$image->centerCrop()) {
|
||||||
\OCP\Util::writeLog('contacts',
|
\OCP\Util::writeLog('contacts',
|
||||||
|
Loading…
Reference in New Issue
Block a user