mirror of
https://github.com/friendica/friendica
synced 2025-04-20 17:50:12 +00:00
Diaspora: Photos are now transmitted separately
This commit is contained in:
parent
9a1a406c03
commit
d86045058e
4 changed files with 50 additions and 1 deletions
|
@ -137,6 +137,18 @@ class Photo extends BaseModule
|
|||
$scale = intval(substr($photoid, -1, 1));
|
||||
$photoid = substr($photoid, 0, -2);
|
||||
}
|
||||
|
||||
if (!empty($this->parameters['size'])) {
|
||||
switch ($this->parameters['size']) {
|
||||
case 'thumb_small':
|
||||
$scale = 2;
|
||||
break;
|
||||
case 'scaled_full':
|
||||
$scale = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$photo = MPhoto::getPhoto($photoid, $scale);
|
||||
if ($photo === false) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo with id %s is not available.', $photoid));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue