This commit is contained in:
friendica 2012-07-08 22:34:21 -07:00
commit ab710bce3b
7 changed files with 32 additions and 5 deletions

View file

@ -143,7 +143,7 @@ class Photo {
public function orient($filename) { public function orient($filename) {
// based off comment on http://php.net/manual/en/function.imagerotate.php // 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; return;
$exif = exif_read_data($filename); $exif = exif_read_data($filename);

View file

@ -3621,7 +3621,9 @@ function posted_dates($uid,$wall) {
$dnow = substr($dthen,0,8) . '28'; $dnow = substr($dthen,0,8) . '28';
$ret = array(); $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'; $dstart = substr($dnow,0,8) . '01';
$dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5))); $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5)));
$start_month = datetime_convert('','',$dstart,'Y-m-d'); $start_month = datetime_convert('','',$dstart,'Y-m-d');

View file

@ -740,8 +740,7 @@ function photos_post(&$a) {
killme(); killme();
} }
if($ph->getType() != 'image/png') $ph->orient($src);
$ph->orient($src);
@unlink($src); @unlink($src);
$max_length = get_config('system','max_image_length'); $max_length = get_config('system','max_image_length');

View file

@ -128,6 +128,7 @@ function profile_photo_post(&$a) {
return; return;
} }
$ph->orient($src);
@unlink($src); @unlink($src);
return profile_photo_crop_ui_head($a, $ph); return profile_photo_crop_ui_head($a, $ph);
@ -237,6 +238,12 @@ function profile_photo_content(&$a) {
if(! function_exists('_crop_ui_head')) { if(! function_exists('_crop_ui_head')) {
function profile_photo_crop_ui_head(&$a, $ph){ 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(); $width = $ph->getWidth();
$height = $ph->getHeight(); $height = $ph->getHeight();

View file

@ -101,8 +101,15 @@ function wall_upload_post(&$a) {
killme(); killme();
} }
$ph->orient($src);
@unlink($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(); $width = $ph->getWidth();
$height = $ph->getHeight(); $height = $ph->getHeight();

View file

@ -42,6 +42,7 @@ $(document).ready(function() {
}); });
function tautogrow(id){ function tautogrow(id){
$("textarea#comment-edit-text-" +id).autogrow(); $("textarea#comment-edit-text-" +id).autogrow();
}; };
@ -128,6 +129,17 @@ $(document).ready(function() {
function cmtBbClose(id) { function cmtBbClose(id) {
$(".comment-edit-bb-" + id).hide(); $(".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);
})
</script> </script>

View file

@ -137,7 +137,7 @@
<div id="scrollup" style="position: fixed; bottom: 5px; right: 10px;z-index: 97;"><a id="down" onclick="scrolldown()" ><img id="scroll_top_bottom" src="view/theme/diabook/icons/scroll_bottom.png" style="display:cursor !important;" alt="back to top" title="Scroll to bottom"></a></div> <div id="scrollup" style="position: fixed; bottom: 5px; right: 10px;z-index: 97;"><a id="down" onclick="scrolldown()" ><img id="scroll_top_bottom" src="view/theme/diabook/icons/scroll_bottom.png" style="display:cursor !important;" alt="back to top" title="Scroll to bottom"></a></div>
<div style="position: fixed; bottom: 3px; left: 25px;">$langselector</div> <div style="position: fixed; bottom: 61px; left: 6px;">$langselector</div>
<div style="position: fixed; bottom: 23px; left: 5px;"><a href="http://pad.toktan.org/p/diabook" target="blank" ><img src="view/theme/diabook/icons/bluebug.png" title="report bugs for the theme diabook"/></a></div> <div style="position: fixed; bottom: 23px; left: 5px;"><a href="http://pad.toktan.org/p/diabook" target="blank" ><img src="view/theme/diabook/icons/bluebug.png" title="report bugs for the theme diabook"/></a></div>