X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FPhoto.php;h=954b3f3eecca60dab3911b439eab9a08fea4d734;hb=ffa44b8dc0b2ac0d65da245766cf0826e219d9a8;hp=7a952de407382ff8b4b56cda2b1488f4c183ceaf;hpb=df021b07e330740510320fe5e0e1700829104b44;p=friendica.git diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 7a952de407..954b3f3eec 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -49,7 +49,7 @@ use Friendica\Worker\UpdateContact; /** * Photo Module */ -class Photo extends BaseModule +class Photo extends BaseApi { /** * Module initializer @@ -149,7 +149,7 @@ class Photo extends BaseModule } } - $photo = MPhoto::getPhoto($photoid, $scale); + $photo = MPhoto::getPhoto($photoid, $scale, self::getCurrentUserID()); if ($photo === false) { throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo with id %s is not available.', $photoid)); } @@ -282,7 +282,7 @@ class Photo extends BaseModule } if (Network::isLocalLink($url) && preg_match('|.*?/photo/(.*[a-fA-F0-9])\-(.*[0-9])\..*[\w]|', $url, $matches)) { - return MPhoto::getPhoto($matches[1], $matches[2]); + return MPhoto::getPhoto($matches[1], $matches[2], self::getCurrentUserID()); } return MPhoto::createPhotoForExternalResource($url, (int)DI::userSession()->getLocalUserId(), $media['mimetype'] ?? '', $media['blurhash'], $width, $height); @@ -293,7 +293,7 @@ class Photo extends BaseModule } if (Network::isLocalLink($media['url']) && preg_match('|.*?/photo/(.*[a-fA-F0-9])\-(.*[0-9])\..*[\w]|', $media['url'], $matches)) { - return MPhoto::getPhoto($matches[1], $matches[2]); + return MPhoto::getPhoto($matches[1], $matches[2], self::getCurrentUserID()); } return MPhoto::createPhotoForExternalResource($media['url'], (int)DI::userSession()->getLocalUserId(), $media['mimetype'], $media['blurhash'], $media['width'], $media['height']);