diff options
author | friendica <info@friendica.com> | 2012-07-02 19:12:58 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-02 19:12:58 -0700 |
commit | 14d4635be658924eb5aae06e799e558bcfbb5bc3 (patch) | |
tree | d391ac87e4d443111f6ac055d9a11c061685fc98 /mod | |
parent | f7144e671c79302f33ef2928955d8100a4ab4cc6 (diff) | |
parent | 3fe5bdbd8de265ffe558fb3c91eac64ccdd2d158 (diff) | |
download | volse-hubzilla-14d4635be658924eb5aae06e799e558bcfbb5bc3.tar.gz volse-hubzilla-14d4635be658924eb5aae06e799e558bcfbb5bc3.tar.bz2 volse-hubzilla-14d4635be658924eb5aae06e799e558bcfbb5bc3.zip |
Merge pull request #371 from fermionic/option-to-limit-max-image-pixel-length
add ability to set maximum pixel length of uploaded pictures
Diffstat (limited to 'mod')
-rw-r--r-- | mod/photos.php | 6 |
1 files changed, 6 insertions, 0 deletions
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(); |