]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only do all the "find path" magic when we need to register them
authorJoas Schilling <nickvergessen@owncloud.com>
Fri, 13 Mar 2015 08:45:53 +0000 (09:45 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Mon, 16 Mar 2015 11:44:11 +0000 (12:44 +0100)
lib/private/previewmanager.php

index 9f83d88a1fea7fc3bbceeed4282e8035f773910c..59d832cfbd744e4c4a3fb219d8b810e40a8e42dd 100644 (file)
@@ -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();
+               }
        }
 
        /**