diff --git a/lib/private/previewmanager.php b/lib/private/previewmanager.php index e017923297..fca1000c93 100644 --- a/lib/private/previewmanager.php +++ b/lib/private/previewmanager.php @@ -15,6 +15,9 @@ class PreviewManager implements IPreview { /** @var array */ protected $providers = []; + /** @var array */ + protected $defaultProviders; + /** * Constructor */ @@ -71,7 +74,7 @@ class PreviewManager implements IPreview { * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly * @return \OCP\Image */ - function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false) { + public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false) { $preview = new \OC\Preview('', '/', $file, $maxX, $maxY, $scaleUp); return $preview->getPreview(); } @@ -82,7 +85,7 @@ class PreviewManager implements IPreview { * @param string $mimeType * @return boolean */ - function isMimeSupported($mimeType = '*') { + public function isMimeSupported($mimeType = '*') { if (!\OC::$server->getConfig()->getSystemValue('enable_previews', true)) { return false; } @@ -102,7 +105,7 @@ class PreviewManager implements IPreview { * @param \OCP\Files\FileInfo $file * @return bool */ - function isAvailable($file) { + public function isAvailable(\OCP\Files\FileInfo $file) { if (!\OC::$server->getConfig()->getSystemValue('enable_previews', true)) { return false; } @@ -130,9 +133,6 @@ class PreviewManager implements IPreview { return false; } - /** @var array */ - protected $defaultProviders; - /** * List of enabled default providers * diff --git a/lib/public/ipreview.php b/lib/public/ipreview.php index 4a45fa2908..e1562bce58 100644 --- a/lib/public/ipreview.php +++ b/lib/public/ipreview.php @@ -69,7 +69,7 @@ interface IPreview { * @param boolean $scaleUp Scale smaller images up to the thumbnail size or not. Might look ugly * @return \OCP\Image */ - function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false); + public function createPreview($file, $maxX = 100, $maxY = 75, $scaleUp = false); /** @@ -77,7 +77,7 @@ interface IPreview { * @param string $mimeType * @return boolean */ - function isMimeSupported($mimeType = '*'); + public function isMimeSupported($mimeType = '*'); /** * Check if a preview can be generated for a file @@ -85,5 +85,5 @@ interface IPreview { * @param \OCP\Files\FileInfo $file * @return bool */ - function isAvailable($file); + public function isAvailable(\OCP\Files\FileInfo $file); }