aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-03-13 09:45:53 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-16 12:44:11 +0100
commit9c86574acfc3bd893e65572bdcbb831bf0a1530a (patch)
treed39b0551d2c4a880e826cfcde7355ee73ed00265
parente38dea3542ee48c6ad51808fc28d9d098cc804b2 (diff)
downloadnextcloud-server-9c86574acfc3bd893e65572bdcbb831bf0a1530a.tar.gz
nextcloud-server-9c86574acfc3bd893e65572bdcbb831bf0a1530a.zip
Only do all the "find path" magic when we need to register them
-rw-r--r--lib/private/previewmanager.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/previewmanager.php b/lib/private/previewmanager.php
index 9f83d88a1fe..59d832cfbd7 100644
--- a/lib/private/previewmanager.php
+++ b/lib/private/previewmanager.php
@@ -31,7 +31,11 @@ class PreviewManager implements IPreview {
*/
public function __construct(\OCP\IConfig $config) {
$this->config = $config;
- $this->registerCoreProviders();
+
+ if ($this->config->getSystemValue('enable_previews', true)) {
+ // Register the default providers like txt, image, ...
+ $this->registerCoreProviders();
+ }
}
/**