diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-07-20 17:51:50 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-07-20 17:58:05 +0200 |
commit | 48306a3c4f708b80143757acbe9b270be476aab4 (patch) | |
tree | 07aa5b940a9126a20892a150139dee347d4cbe75 /lib/image.php | |
parent | 0e111e1a17140a8a42a3dbf2ecce41e424b2afab (diff) | |
download | nextcloud-server-48306a3c4f708b80143757acbe9b270be476aab4.tar.gz nextcloud-server-48306a3c4f708b80143757acbe9b270be476aab4.zip |
fix unused variables
Diffstat (limited to 'lib/image.php')
-rw-r--r-- | lib/image.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/image.php b/lib/image.php index 01e843d8316..c438b3d67f6 100644 --- a/lib/image.php +++ b/lib/image.php @@ -24,8 +24,8 @@ //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 ) { - return $type; + if ( ( $info = getimagesize( $filename ) ) !== false ) { + return $info[2]; } return false; } @@ -364,7 +364,7 @@ class OC_Image { public function load($imageref) { if(is_resource($imageref)) { if(get_resource_type($imageref) == 'gd') { - $this->resource = $res; + $this->resource = $imageref; return $this->resource; } elseif(in_array(get_resource_type($imageref), array('file','stream'))) { return $this->loadFromFileHandle($imageref); @@ -650,9 +650,6 @@ class OC_Image { OC_Log::write('core',__METHOD__.'(): No image loaded', OC_Log::ERROR); return false; } - $width_orig=imageSX($this->resource); - $height_orig=imageSY($this->resource); - //OC_Log::write('core',__METHOD__.'(): Original size: '.$width_orig.'x'.$height_orig, OC_Log::DEBUG); $process = imagecreatetruecolor($w, $h); if ($process == false) { OC_Log::write('core',__METHOD__.'(): Error creating true color image',OC_Log::ERROR); |