]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Photo.php
Adhere feedback
[friendica.git] / src / Module / Photo.php
index 3f18058de28cf3899cbe5770751379e869da4b96..687ba98c741be25d7edc9512742bf610d689edfc 100644 (file)
@@ -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));