From: Joas Schilling Date: Fri, 13 Mar 2015 08:45:53 +0000 (+0100) Subject: Only do all the "find path" magic when we need to register them X-Git-Tag: v8.1.0alpha1~231^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9c86574acfc3bd893e65572bdcbb831bf0a1530a;p=nextcloud-server.git Only do all the "find path" magic when we need to register them --- 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(); + } } /**