]> source.dussan.org Git - nextcloud-server.git/commitdiff
invert logic of disable_previews
authorGeorg Ehrke <developer@georgehrke.com>
Thu, 29 Aug 2013 08:08:53 +0000 (10:08 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Thu, 29 Aug 2013 08:08:53 +0000 (10:08 +0200)
config/config.sample.php
lib/preview.php

index 76de97818d5ab6b63970a1e434296f8a9d14278c..6dd45163677235fe264912f30dbc6cad0d14de76 100644 (file)
@@ -191,7 +191,7 @@ $CONFIG = array(
 'customclient_ios' => '', //https://itunes.apple.com/us/app/owncloud/id543672169?mt=8
 
 // PREVIEW
-'disable_previews' => false,
+'enable_previews' => true,
 /* the max width of a generated preview, if value is null, there is no limit */
 'preview_max_x' => null,
 /* the max height of a generated preview, if value is null, there is no limit */
index a8a8580e229e285a067522aeb69b809c7313253f..164ad10ba5ff603a0d7fcbb4197ec48415920218 100755 (executable)
@@ -569,9 +569,9 @@ class Preview {
         * @return void
         */
        private static function initProviders() {
-               if(\OC_Config::getValue('disable_previews', false)) {
+               if(!\OC_Config::getValue('enable_previews', true)) {
                        $provider = new Preview\Unknown();
-                       self::$providers = array($provider);
+                       self::$providers = array($provider->getMimeType() => $provider);
                        return;
                }
 
@@ -606,7 +606,7 @@ class Preview {
        }
 
        public static function isMimeSupported($mimetype) {
-               if(\OC_Config::getValue('disable_previews', false)) {
+               if(!\OC_Config::getValue('enable_previews', true)) {
                        return false;
                }