Pluggable storage backends: first steps

- add backend related columns in photo table
- add system resource storage class
- add code to load image data from backend class
- return "nosign" image as photo meta with SystemResource backend
This commit is contained in:
fabrixxm 2018-11-20 23:15:03 +01:00 committed by Hypolite Petovan
parent 89eaf508f1
commit 3b3c4e8cc7
4 changed files with 83 additions and 10 deletions

View 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']}.");