Return more absolute url in Photo::getSizes::type::url

This commit is contained in:
celestora 2022-12-21 01:20:17 +02:00 committed by GitHub
parent 687f2937d2
commit 3c4f41e58c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,7 +156,7 @@ class Photo extends Media
foreach($sizes as $id => $meta) { foreach($sizes as $id => $meta) {
if(isset($meta[3]) && !$meta[3]) { if(isset($meta[3]) && !$meta[3]) {
$res[$id] = (object) [ $res[$id] = (object) [
"url" => "/photos/thumbnails/" . $this->getId() . "_$id.jpeg", "url" => ovk_scheme(true) . $_SERVER["HTTP_HOST"] . "/photos/thumbnails/" . $this->getId() . "_$id.jpeg",
"width" => NULL, "width" => NULL,
"height" => NULL, "height" => NULL,
"crop" => NULL "crop" => NULL