some minor improvements to preview lib

This commit is contained in:
Georg Ehrke 2013-06-26 10:57:37 +02:00
parent c7fdf00e84
commit a98391b976
1 changed files with 6 additions and 1 deletions

View File

@ -323,7 +323,7 @@ class Preview {
}else{
$mimetype = $this->fileview->getMimeType($file);
$preview;
$preview = null;
foreach(self::$providers as $supportedmimetype => $provider) {
if(!preg_match($supportedmimetype, $mimetype)) {
@ -350,6 +350,11 @@ class Preview {
break;
}
if(is_null($preview) || $preview === false) {
$preview = new \OC_Image();
}
$this->preview = $preview;
}
$this->resizeAndCrop();