cleanup issues discovered in the logs
This commit is contained in:
parent
9096e4c8e3
commit
5c21798ed3
@ -325,45 +325,47 @@ class Photo {
|
|||||||
if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') )
|
if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$exif = exif_read_data($filename);
|
$exif = @exif_read_data($filename);
|
||||||
$ort = $exif['Orientation'];
|
if($exif) {
|
||||||
|
$ort = $exif['Orientation'];
|
||||||
|
|
||||||
switch($ort)
|
switch($ort)
|
||||||
{
|
{
|
||||||
case 1: // nothing
|
case 1: // nothing
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // horizontal flip
|
case 2: // horizontal flip
|
||||||
$this->flip();
|
$this->flip();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // 180 rotate left
|
case 3: // 180 rotate left
|
||||||
$this->rotate(180);
|
$this->rotate(180);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // vertical flip
|
case 4: // vertical flip
|
||||||
$this->flip(false, true);
|
$this->flip(false, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5: // vertical flip + 90 rotate right
|
case 5: // vertical flip + 90 rotate right
|
||||||
$this->flip(false, true);
|
$this->flip(false, true);
|
||||||
$this->rotate(-90);
|
$this->rotate(-90);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6: // 90 rotate right
|
case 6: // 90 rotate right
|
||||||
$this->rotate(-90);
|
$this->rotate(-90);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // horizontal flip + 90 rotate right
|
case 7: // horizontal flip + 90 rotate right
|
||||||
$this->flip();
|
$this->flip();
|
||||||
$this->rotate(-90);
|
$this->rotate(-90);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8: // 90 rotate left
|
case 8: // 90 rotate left
|
||||||
$this->rotate(90);
|
$this->rotate(90);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1558,7 +1558,7 @@ function send_status_notifications($post_id,$item) {
|
|||||||
'from_xchan' => $item['author_xchan'],
|
'from_xchan' => $item['author_xchan'],
|
||||||
'to_xchan' => $r[0]['channel_hash'],
|
'to_xchan' => $r[0]['channel_hash'],
|
||||||
'item' => $item,
|
'item' => $item,
|
||||||
'link' => $a->get_baseurl() . '/display/' . $item['uri'],
|
'link' => get_app()->get_baseurl() . '/display/' . $item['uri'],
|
||||||
'verb' => ACTIVITY_POST,
|
'verb' => ACTIVITY_POST,
|
||||||
'otype' => 'item',
|
'otype' => 'item',
|
||||||
'parent' => $parent,
|
'parent' => $parent,
|
||||||
|
Reference in New Issue
Block a user