X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile_photo.php;h=378353f65377db0e4d9609914c83d29700ac3ca0;hb=49ad9b355c352211375247e6fcacdfd1970599ed;hp=2817f39423cf8213da8a7625f0e10884a000f471;hpb=7cc8c369cb6a01cffb58215966844b53794f32f4;p=friendica.git diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 2817f39423..378353f653 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -109,7 +109,8 @@ function profile_photo_post(&$a) { $filename = basename($_FILES['userfile']['name']); $filesize = intval($_FILES['userfile']['size']); $filetype = $_FILES['userfile']['type']; - + if ($filetype=="") $filetype=guess_image_type($filename); + $maximagesize = get_config('system','maximagesize'); if(($maximagesize) && ($filesize > $maximagesize)) { @@ -127,6 +128,7 @@ function profile_photo_post(&$a) { return; } + $ph->orient($src); @unlink($src); return profile_photo_crop_ui_head($a, $ph); @@ -236,6 +238,12 @@ function profile_photo_content(&$a) { if(! function_exists('_crop_ui_head')) { function profile_photo_crop_ui_head(&$a, $ph){ + $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(); @@ -271,6 +279,7 @@ function profile_photo_crop_ui_head(&$a, $ph){ $a->config['imagecrop_resolution'] = $smallest; $a->config['imagecrop_ext'] = $ph->getExt(); $a->page['htmlhead'] .= get_markup_template("crophead.tpl"); + $a->page['end'] .= get_markup_template("cropend.tpl"); return; }}