diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-08-29 10:08:53 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-08-29 10:08:53 +0200 |
commit | 70b6e2161ec654f7049027bf6dc5072c1eda4d5e (patch) | |
tree | e9980c0025156a7bd626d659b408013452bd64b3 | |
parent | b16a018da99259278ba2f93f1e0c2d2e2bce6fb0 (diff) | |
download | nextcloud-server-70b6e2161ec654f7049027bf6dc5072c1eda4d5e.tar.gz nextcloud-server-70b6e2161ec654f7049027bf6dc5072c1eda4d5e.zip |
invert logic of disable_previews
-rw-r--r-- | config/config.sample.php | 2 | ||||
-rwxr-xr-x | lib/preview.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 76de97818d5..6dd45163677 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -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 */ diff --git a/lib/preview.php b/lib/preview.php index a8a8580e229..164ad10ba5f 100755 --- a/lib/preview.php +++ b/lib/preview.php @@ -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; } |