some minor improvements to preview lib
This commit is contained in:
parent
c7fdf00e84
commit
a98391b976
|
@ -323,7 +323,7 @@ class Preview {
|
||||||
}else{
|
}else{
|
||||||
$mimetype = $this->fileview->getMimeType($file);
|
$mimetype = $this->fileview->getMimeType($file);
|
||||||
|
|
||||||
$preview;
|
$preview = null;
|
||||||
|
|
||||||
foreach(self::$providers as $supportedmimetype => $provider) {
|
foreach(self::$providers as $supportedmimetype => $provider) {
|
||||||
if(!preg_match($supportedmimetype, $mimetype)) {
|
if(!preg_match($supportedmimetype, $mimetype)) {
|
||||||
|
@ -350,6 +350,11 @@ class Preview {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_null($preview) || $preview === false) {
|
||||||
|
$preview = new \OC_Image();
|
||||||
|
}
|
||||||
|
|
||||||
$this->preview = $preview;
|
$this->preview = $preview;
|
||||||
}
|
}
|
||||||
$this->resizeAndCrop();
|
$this->resizeAndCrop();
|
||||||
|
|
Loading…
Reference in New Issue