diff --git a/include/Photo.php b/include/Photo.php index 3af1691ee..ba4241a7b 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -143,7 +143,7 @@ class Photo { public function orient($filename) { // based off comment on http://php.net/manual/en/function.imagerotate.php - if(! function_exists('exif_read_data')) + if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') ) return; $exif = exif_read_data($filename); diff --git a/include/items.php b/include/items.php index 36a027eec..e656fc244 100755 --- a/include/items.php +++ b/include/items.php @@ -3621,7 +3621,9 @@ function posted_dates($uid,$wall) { $dnow = substr($dthen,0,8) . '28'; $ret = array(); - while($dnow >= $dthen) { + // Starting with the current month, get the first and last days of every + // month down to and including the month of the first post + while(substr($dnow, 0, 7) >= substr($dthen, 0, 7)) { $dstart = substr($dnow,0,8) . '01'; $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5))); $start_month = datetime_convert('','',$dstart,'Y-m-d'); 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_photo.php b/mod/profile_photo.php index e44707f9b..67b2c4ab4 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -128,6 +128,7 @@ function profile_photo_post(&$a) { return; } + $ph->orient($src); @unlink($src); return profile_photo_crop_ui_head($a, $ph); @@ -237,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(); 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(); diff --git a/view/theme/diabook/bottom.tpl b/view/theme/diabook/bottom.tpl index 50a15788d..0ab7de78e 100644 --- a/view/theme/diabook/bottom.tpl +++ b/view/theme/diabook/bottom.tpl @@ -42,6 +42,7 @@ $(document).ready(function() { }); + function tautogrow(id){ $("textarea#comment-edit-text-" +id).autogrow(); }; @@ -128,6 +129,17 @@ $(document).ready(function() { function cmtBbClose(id) { $(".comment-edit-bb-" + id).hide(); } + + $(document).ready(function(){ + var doctitle = document.title; + function checkNotify() { + if(document.getElementById("notify-update").innerHTML != "") + document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle; + else + document.title = doctitle; + }; + setInterval(function () {checkNotify();}, 10 * 1000); + }) diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 4165656bd..1424c0e39 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -137,7 +137,7 @@
-