mirror of
https://github.com/friendica/friendica
synced 2025-04-22 12:30:12 +00:00
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:
parent
89eaf508f1
commit
3b3c4e8cc7
4 changed files with 83 additions and 10 deletions
|
@ -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']}.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue