diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-11 17:44:02 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-14 08:38:37 +0100 |
commit | ffae6f4b847e96d691053300c355ab81edc6c1c8 (patch) | |
tree | 928a210abf40ab333c0a08fb469be87c71147b24 /lib/image.php | |
parent | 2d6d0a4ad438590504c13f04a6b2916a59a99c30 (diff) | |
download | nextcloud-server-ffae6f4b847e96d691053300c355ab81edc6c1c8.tar.gz nextcloud-server-ffae6f4b847e96d691053300c355ab81edc6c1c8.zip |
Style-fix: Breakup long lines
Diffstat (limited to 'lib/image.php')
-rw-r--r-- | lib/image.php | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/lib/image.php b/lib/image.php index eaa35350bcb..7b0cbefd657 100644 --- a/lib/image.php +++ b/lib/image.php @@ -169,7 +169,9 @@ class OC_Image { if (!file_exists(dirname($filepath))) mkdir(dirname($filepath), 0777, true); if(!is_writable(dirname($filepath))) { - OC_Log::write('core', __METHOD__.'(): Directory \''.dirname($filepath).'\' is not writable.', OC_Log::ERROR); + OC_Log::write('core', + __METHOD__.'(): Directory \''.dirname($filepath).'\' is not writable.', + OC_Log::ERROR); return false; } elseif(is_writable(dirname($filepath)) && file_exists($filepath) && !is_writable($filepath)) { OC_Log::write('core', __METHOD__.'(): File \''.$filepath.'\' is not writable.', OC_Log::ERROR); @@ -394,35 +396,45 @@ class OC_Image { if (imagetypes() & IMG_GIF) { $this->resource = imagecreatefromgif($imagepath); } else { - OC_Log::write('core', 'OC_Image->loadFromFile, GIF images not supported: '.$imagepath, OC_Log::DEBUG); + OC_Log::write('core', + 'OC_Image->loadFromFile, GIF images not supported: '.$imagepath, + OC_Log::DEBUG); } break; case IMAGETYPE_JPEG: if (imagetypes() & IMG_JPG) { $this->resource = imagecreatefromjpeg($imagepath); } else { - OC_Log::write('core', 'OC_Image->loadFromFile, JPG images not supported: '.$imagepath, OC_Log::DEBUG); + OC_Log::write('core', + 'OC_Image->loadFromFile, JPG images not supported: '.$imagepath, + OC_Log::DEBUG); } break; case IMAGETYPE_PNG: if (imagetypes() & IMG_PNG) { $this->resource = imagecreatefrompng($imagepath); } else { - OC_Log::write('core', 'OC_Image->loadFromFile, PNG images not supported: '.$imagepath, OC_Log::DEBUG); + OC_Log::write('core', + 'OC_Image->loadFromFile, PNG images not supported: '.$imagepath, + OC_Log::DEBUG); } break; case IMAGETYPE_XBM: if (imagetypes() & IMG_XPM) { $this->resource = imagecreatefromxbm($imagepath); } else { - OC_Log::write('core', 'OC_Image->loadFromFile, XBM/XPM images not supported: '.$imagepath, OC_Log::DEBUG); + OC_Log::write('core', + 'OC_Image->loadFromFile, XBM/XPM images not supported: '.$imagepath, + OC_Log::DEBUG); } break; case IMAGETYPE_WBMP: if (imagetypes() & IMG_WBMP) { $this->resource = imagecreatefromwbmp($imagepath); } else { - OC_Log::write('core', 'OC_Image->loadFromFile, WBMP images not supported: '.$imagepath, OC_Log::DEBUG); + OC_Log::write('core', + 'OC_Image->loadFromFile, WBMP images not supported: '.$imagepath, + OC_Log::DEBUG); } break; case IMAGETYPE_BMP: @@ -633,7 +645,9 @@ class OC_Image { $color[1] = $palette[ $color[1] + 1 ]; break; default: - trigger_error('imagecreatefrombmp: ' . $filename . ' has ' . $meta['bits'] . ' bits and this is not supported!', E_USER_WARNING); + trigger_error('imagecreatefrombmp: ' + . $filename . ' has ' . $meta['bits'] . ' bits and this is not supported!', + E_USER_WARNING); return false; } imagesetpixel($im, $x, $y, $color[1]); @@ -739,7 +753,9 @@ class OC_Image { } imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height); if ($process == false) { - OC_Log::write('core', 'OC_Image->centerCrop. Error resampling process image '.$width.'x'.$height, OC_Log::ERROR); + OC_Log::write('core', + 'OC_Image->centerCrop. Error resampling process image '.$width.'x'.$height, + OC_Log::ERROR); imagedestroy($process); return false; } |