diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-01-20 17:13:49 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-01-20 17:13:49 +0100 |
commit | 6866165a37de338d51abce7bf1651f2a1447bccb (patch) | |
tree | 2e3d1a61e8b333cc5bab7ef6874453237f296ad4 /lib/image.php | |
parent | 1c311c36bf29304c220489fdb0d1089c8d299149 (diff) | |
download | nextcloud-server-6866165a37de338d51abce7bf1651f2a1447bccb.tar.gz nextcloud-server-6866165a37de338d51abce7bf1651f2a1447bccb.zip |
make oc_image work when php_exif isn't enabled
Diffstat (limited to 'lib/image.php')
-rw-r--r-- | lib/image.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/image.php b/lib/image.php index 70ad3f5969e..6de3ed9104d 100644 --- a/lib/image.php +++ b/lib/image.php @@ -21,8 +21,7 @@ * */ -/** From user comments at http://dk2.php.net/manual/en/function.exif-imagetype.php - * Don't know if it can come in handy? +//From user comments at http://dk2.php.net/manual/en/function.exif-imagetype.php if ( ! function_exists( 'exif_imagetype' ) ) { function exif_imagetype ( $filename ) { if ( ( list($width, $height, $type, $attr) = getimagesize( $filename ) ) !== false ) { @@ -31,7 +30,6 @@ if ( ! function_exists( 'exif_imagetype' ) ) { return false; } } -*/ function ellipsis($str, $maxlen) { if (strlen($str) > $maxlen) { @@ -205,6 +203,10 @@ class OC_Image { * @returns bool. */ public function fixOrientation() { + if(!is_callable('exif_read_data')){ + OC_Log::write('core','OC_Image::fixOrientation() Exif module not enabled.', OC_Log::DEBUG); + return false; + } if(!is_resource(self::$resource)) { OC_Log::write('core','OC_Image::fixOrientation() No image loaded.', OC_Log::DEBUG); return false; |