]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Photo.php
Pluggable storage backends: first steps
[friendica.git] / src / Module / Photo.php
index 0fddb8276a0e2df72d5b07cda646c295e09f9acc..f65ca698b0836f14d6a3549669299a5266311ed1 100644 (file)
@@ -77,9 +77,9 @@ class Photo extends BaseModule
                        killme();
                }
 
-               $cacheable = ($photo["allow_cid"].$photo["allow_gid"].$photo["deny_cid"].$photo["deny_gid"] === "") || defaults($photo, "cacheable", false);
+               $cacheable = ($photo["allow_cid"].$photo["allow_gid"].$photo["deny_cid"].$photo["deny_gid"] === "") && (isset($photo["cacheable"])?$photo["cacheable"]:true);
 
-               $img = MPhoto::getImageForPhotoId($photo["id"]);
+               $img = MPhoto::getImageForPhoto($photo);
 
                if (is_null($img) || !$img->isValid()) {
                        Logger::log("Invalid photo with id {$photo['id']}.");