add ability to set maximum pixel length of uploaded pictures
This commit is contained in:
parent
f7144e671c
commit
3fe5bdbd8d
2 changed files with 24 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue