summaryrefslogtreecommitdiffstats
path: root/lib/preview.php
diff options
context:
space:
mode:
authorGeorg Ehrke <georg@ownCloud.com>2013-06-13 09:52:39 +0200
committerGeorg Ehrke <georg@ownCloud.com>2013-06-13 09:52:39 +0200
commit25981a079a185080ad3ca2d2a23dd827efbd9d05 (patch)
treea3bbeef73467cb55e21b63297473d5cee91579a4 /lib/preview.php
parentf89a23b463884e1a9b89c84fdcb1c34afba62645 (diff)
downloadnextcloud-server-25981a079a185080ad3ca2d2a23dd827efbd9d05.tar.gz
nextcloud-server-25981a079a185080ad3ca2d2a23dd827efbd9d05.zip
some whitespace fixes
Diffstat (limited to 'lib/preview.php')
-rwxr-xr-xlib/preview.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/preview.php b/lib/preview.php
index ed33e7b09dc..3564fe3df44 100755
--- a/lib/preview.php
+++ b/lib/preview.php
@@ -41,6 +41,7 @@ class Preview {
private $maxY;
private $scalingup;
+ //preview images object
private $preview;
//preview providers
@@ -81,7 +82,7 @@ class Preview {
$this->maxX = $this->max_x;
}
}
-
+
if(!is_null($this->max_y)) {
if($this->maxY > $this->max_y) {
\OC_Log::write('core', 'maxY reduced from ' . $this->maxY . ' to ' . $this->max_y, \OC_Log::DEBUG);
@@ -101,25 +102,25 @@ class Preview {
if(empty(self::$providers)) {
self::initProviders();
}
-
+
//check if there are any providers at all
if(empty(self::$providers)) {
\OC_Log::write('core', 'No preview providers exist', \OC_Log::ERROR);
throw new \Exception('No providers');
}
-
+
//validate parameters
if($file === '') {
\OC_Log::write('core', 'No filename passed', \OC_Log::ERROR);
throw new \Exception('File not found');
}
-
+
//check if file exists
if(!$this->fileview->file_exists($file)) {
\OC_Log::write('core', 'File:"' . $file . '" not found', \OC_Log::ERROR);
throw new \Exception('File not found');
}
-
+
//check if given size makes sense
if($maxX === 0 || $maxY === 0) {
\OC_Log::write('core', 'Can not create preview with 0px width or 0px height', \OC_Log::ERROR);