diff options
author | Mario <mario@mariovavti.com> | 2019-04-13 21:19:06 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-04-13 21:19:06 +0200 |
commit | 9c8cb4dea37a25d4602930373624607b570f2f06 (patch) | |
tree | 0cb60e30fd71c75055b5a3c652b57d61f5d46bbf /include/photos.php | |
parent | 064f93185cf4204df2afa7ce23f8fe2dc8ce26ae (diff) | |
parent | ed902fdb703103944494e5c70ae354087c2208ad (diff) | |
download | volse-hubzilla-9c8cb4dea37a25d4602930373624607b570f2f06.tar.gz volse-hubzilla-9c8cb4dea37a25d4602930373624607b570f2f06.tar.bz2 volse-hubzilla-9c8cb4dea37a25d4602930373624607b570f2f06.zip |
Merge branch 'dev' into 'dev'
Thumbnails storage in filesystem or database implementation
See merge request hubzilla/core!1588
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/photos.php b/include/photos.php index 44406e0b0..7ea2729ae 100644 --- a/include/photos.php +++ b/include/photos.php @@ -277,8 +277,7 @@ function photo_upload($channel, $observer, $args) { if(($width > 1024 || $height > 1024) && (! $errors)) $ph->scaleImage(1024); - $p['imgscale'] = 1; - $r1 = $ph->save($p); + $r1 = $ph->storeThumbnail($p, PHOTO_RES_1024); $link[1] = array( 'rel' => 'alternate', 'type' => 'text/html', @@ -292,8 +291,7 @@ function photo_upload($channel, $observer, $args) { if(($width > 640 || $height > 640) && (! $errors)) $ph->scaleImage(640); - $p['imgscale'] = 2; - $r2 = $ph->save($p); + $r2 = $ph->storeThumbnail($p, PHOTO_RES_640); $link[2] = array( 'rel' => 'alternate', 'type' => 'text/html', @@ -307,8 +305,7 @@ function photo_upload($channel, $observer, $args) { if(($width > 320 || $height > 320) && (! $errors)) $ph->scaleImage(320); - $p['imgscale'] = 3; - $r3 = $ph->save($p); + $r3 = $ph->storeThumbnail($p, PHOTO_RES_320); $link[3] = array( 'rel' => 'alternate', 'type' => 'text/html', |