@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | public function processExifData() |
| 18 | 18 | { |
| 19 | 19 | $image = $this->owner->Image(); |
| 20 | - $filename = BASE_PATH . '/' . $image->Filename; |
|
| 20 | + $filename = BASE_PATH.'/'.$image->Filename; |
|
| 21 | 21 | |
| 22 | 22 | // when the image is first saved, the file will still be a temp file |
| 23 | 23 | if ($image->exists()) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $seconds = $latarray[2]; |
| 63 | 63 | $parts = explode('/', $seconds); |
| 64 | 64 | $seconds = $parts[0] / $parts[1]; |
| 65 | - $latitude = $degrees + $minutes / 60 + $seconds / 3600; |
|
| 65 | + $latitude = $degrees+$minutes / 60+$seconds / 3600; |
|
| 66 | 66 | $lonarray = $gps['GPSLongitude']; |
| 67 | 67 | $degrees = $lonarray[0]; |
| 68 | 68 | $parts = explode('/', $degrees); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $parts = explode('/', $seconds); |
| 75 | 75 | $seconds = $parts[0] / $parts[1]; |
| 76 | 76 | |
| 77 | - $longitude = $degrees + $minutes / 60 + $seconds / 3600; |
|
| 77 | + $longitude = $degrees+$minutes / 60+$seconds / 3600; |
|
| 78 | 78 | $this->owner->Lat = $latitude; |
| 79 | 79 | $this->owner->Lon = $longitude; |
| 80 | 80 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $image->processExifData(); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - DB::alteration_message('Updated image metadata where EXIF has not been ' . 'processed', 'changed'); |
|
| 111 | + DB::alteration_message('Updated image metadata where EXIF has not been '.'processed', 'changed'); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | } |
@@ -84,8 +84,7 @@ |
||
| 84 | 84 | $this->owner->ExifRead = true; |
| 85 | 85 | $this->owner->Orientation = $this->owner->Image()->getOrientation(); |
| 86 | 86 | $this->owner->write(); |
| 87 | - } |
|
| 88 | - catch (Exception $e) { |
|
| 87 | + } catch (Exception $e) { |
|
| 89 | 88 | error_log($e->getMessage()); |
| 90 | 89 | } |
| 91 | 90 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $folder = Folder::find_or_make('/ImageMetaDataExtensionTest/'); |
| 12 | 12 | $testfilePath = 'assets/ImageMetaDataExtensionTest/test.jpg'; // Important: No leading slash |
| 13 | 13 | |
| 14 | - $sourcePath = getcwd() . '/ss3gallery/tests/test.jpg'; |
|
| 14 | + $sourcePath = getcwd().'/ss3gallery/tests/test.jpg'; |
|
| 15 | 15 | copy($sourcePath, $testfilePath); |
| 16 | 16 | $image = new Image(); |
| 17 | 17 | $image->Filename = $testfilePath; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $image->ParentID = $folder->ID; |
| 20 | 20 | $image->write(); |
| 21 | 21 | |
| 22 | - error_log('IMAGE FILENAME: ' . $image->ID); |
|
| 22 | + error_log('IMAGE FILENAME: '.$image->ID); |
|
| 23 | 23 | $this->assertEquals('assets/ImageMetaDataExtensionTest/test.jpg', $image->Filename); |
| 24 | 24 | |
| 25 | 25 | $gi->ImageID = $image->ID; |