aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-07 19:55:40 -0800
committerfriendica <info@friendica.com>2013-02-07 19:55:40 -0800
commit5c21798ed3c68d6dded1c75166ee0e9bb4ac5d14 (patch)
tree3c4e71db09d2ed5a63c526d705c09bcddfd7d56a /include
parent9096e4c8e32bc48f0f59cda57a0f8e29326d0dd0 (diff)
downloadvolse-hubzilla-5c21798ed3c68d6dded1c75166ee0e9bb4ac5d14.tar.gz
volse-hubzilla-5c21798ed3c68d6dded1c75166ee0e9bb4ac5d14.tar.bz2
volse-hubzilla-5c21798ed3c68d6dded1c75166ee0e9bb4ac5d14.zip
cleanup issues discovered in the logs
Diffstat (limited to 'include')
-rw-r--r--include/Photo.php80
-rwxr-xr-xinclude/items.php2
2 files changed, 42 insertions, 40 deletions
diff --git a/include/Photo.php b/include/Photo.php
index a60cfc868..3eccbb5fb 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -325,45 +325,47 @@ class Photo {
if( (! function_exists('exif_read_data')) || ($this->getType() !== 'image/jpeg') )
return;
- $exif = exif_read_data($filename);
- $ort = $exif['Orientation'];
-
- switch($ort)
- {
- case 1: // nothing
- break;
-
- case 2: // horizontal flip
- $this->flip();
- break;
-
- case 3: // 180 rotate left
- $this->rotate(180);
- break;
-
- case 4: // vertical flip
- $this->flip(false, true);
- break;
-
- case 5: // vertical flip + 90 rotate right
- $this->flip(false, true);
- $this->rotate(-90);
- break;
-
- case 6: // 90 rotate right
- $this->rotate(-90);
- break;
-
- case 7: // horizontal flip + 90 rotate right
- $this->flip();
- $this->rotate(-90);
- break;
-
- case 8: // 90 rotate left
- $this->rotate(90);
- break;
- }
- }
+ $exif = @exif_read_data($filename);
+ if($exif) {
+ $ort = $exif['Orientation'];
+
+ switch($ort)
+ {
+ case 1: // nothing
+ break;
+
+ case 2: // horizontal flip
+ $this->flip();
+ break;
+
+ case 3: // 180 rotate left
+ $this->rotate(180);
+ break;
+
+ case 4: // vertical flip
+ $this->flip(false, true);
+ break;
+
+ case 5: // vertical flip + 90 rotate right
+ $this->flip(false, true);
+ $this->rotate(-90);
+ break;
+
+ case 6: // 90 rotate right
+ $this->rotate(-90);
+ break;
+
+ case 7: // horizontal flip + 90 rotate right
+ $this->flip();
+ $this->rotate(-90);
+ break;
+
+ case 8: // 90 rotate left
+ $this->rotate(90);
+ break;
+ }
+ }
+ }
diff --git a/include/items.php b/include/items.php
index 8f3fa9530..c43f29ad5 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1558,7 +1558,7 @@ function send_status_notifications($post_id,$item) {
'from_xchan' => $item['author_xchan'],
'to_xchan' => $r[0]['channel_hash'],
'item' => $item,
- 'link' => $a->get_baseurl() . '/display/' . $item['uri'],
+ 'link' => get_app()->get_baseurl() . '/display/' . $item['uri'],
'verb' => ACTIVITY_POST,
'otype' => 'item',
'parent' => $parent,