Преглед на файлове

invert logic of disable_previews

tags/v6.0.0alpha2
Georg Ehrke преди 10 години
родител
ревизия
70b6e2161e
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1
    1
      config/config.sample.php
  2. 3
    3
      lib/preview.php

+ 1
- 1
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 */

+ 3
- 3
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;
}


Loading…
Отказ
Запис