From 94fabe3a2942ca93b436694f180f8eb2a72df918 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Jul 2012 06:28:02 -0700 Subject: upstream fixes and a lot of taxonomy stuff --- mod/photos.php | 3 +-- mod/profile.php | 2 +- mod/profile_photo.php | 8 +++++++- mod/wall_upload.php | 7 +++++++ 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/photos.php b/mod/photos.php index 42cad42f9..624f0bdca 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -740,8 +740,7 @@ function photos_post(&$a) { killme(); } - if($ph->getType() != 'image/png') - $ph->orient($src); + $ph->orient($src); @unlink($src); $max_length = get_config('system','max_image_length'); diff --git a/mod/profile.php b/mod/profile.php index b53639c35..b48e035af 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -287,7 +287,7 @@ function profile_content(&$a, $update = 0) { $tag_finder[] = $item['item_id']; $tag_finder_str = implode(', ', $tag_finder); $tags = q("select * from term where oid in ( '%s' ) and otype = %d", - dbesc($tag_finder), + dbesc($tag_finder_str), intval(TERM_OBJ_POST) ); diff --git a/mod/profile_photo.php b/mod/profile_photo.php index e44707f9b..fc0e0419e 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -127,7 +127,7 @@ function profile_photo_post(&$a) { @unlink($src); return; } - + $ph->orient($src); @unlink($src); return profile_photo_crop_ui_head($a, $ph); @@ -237,6 +237,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(); diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 5990f2834..07d97d17a 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -101,8 +101,15 @@ function wall_upload_post(&$a) { killme(); } + $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