From 3fe5bdbd8de265ffe558fb3c91eac64ccdd2d158 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Thu, 28 Jun 2012 10:33:21 -0600 Subject: add ability to set maximum pixel length of uploaded pictures --- mod/photos.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod') diff --git a/mod/photos.php b/mod/photos.php index ea4d7f81f..624f0bdca 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -743,6 +743,12 @@ function photos_post(&$a) { $ph->orient($src); @unlink($src); + $max_length = get_config('system','max_image_length'); + if(! $max_length) + $max_length = MAX_IMAGE_LENGTH; + if($max_length > 0) + $ph->scaleImage($max_length); + $width = $ph->getWidth(); $height = $ph->getHeight(); -- cgit v1.2.3