From 474103dc8234b034722c924b5ba0b55f52993930 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 2 Jan 2021 20:56:18 +0000 Subject: remove unused code and fix width and height not defined --- Zotlabs/Module/Photos.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index e79a640c3..099289c03 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -277,6 +277,9 @@ class Photos extends \Zotlabs\Web\Controller { unset($arr['os_syspath']); + $width = $r[0]['width']; + $height = $r[0]['height']; + if($width > 1024 || $height > 1024) $ph->scaleImage(1024); $ph->storeThumbnail($arr, PHOTO_RES_1024); @@ -310,8 +313,6 @@ class Photos extends \Zotlabs\Web\Controller { ); } - $item_private = (($str_contact_allow || $str_group_allow || $str_contact_deny || $str_group_deny) ? true : false); - $old_is_nsfw = $p[0]['is_nsfw']; if($old_is_nsfw != $is_nsfw) { $r = q("update photo set is_nsfw = %d where resource_id = '%s' and uid = %d", -- cgit v1.2.3