]> git.mxchange.org Git - friendica.git/commitdiff
fix reversed "if"
authorMichael <heluecht@pirati.ca>
Wed, 19 Aug 2020 19:41:22 +0000 (19:41 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 19 Aug 2020 19:41:22 +0000 (19:41 +0000)
src/Worker/ClearCache.php
src/Worker/Cron.php

index c19d13194ad1a94645b17463b7565d93fa9e11ee..a1e78434c234631dc2229d2a7d44854c5352092f 100644 (file)
@@ -37,7 +37,7 @@ class ClearCache
 
                // clear old cache
                DI::cache()->clear();
-               if (!DI::config()->get('system', 'optimize_tables')) {
+               if (DI::config()->get('system', 'optimize_tables')) {
                        DBA::e("OPTIMIZE TABLE `cache`");
                }
 
@@ -66,13 +66,13 @@ class ClearCache
 
                // Delete the cached OEmbed entries that are older than three month
                DBA::delete('oembed', ["`created` < NOW() - INTERVAL 3 MONTH"]);
-               if (!DI::config()->get('system', 'optimize_tables')) {
+               if (DI::config()->get('system', 'optimize_tables')) {
                        DBA::e("OPTIMIZE TABLE `oembed`");
                }
 
                // Delete the cached "parse_url" entries that are older than three month
                DBA::delete('parsed_url', ["`created` < NOW() - INTERVAL 3 MONTH"]);
-               if (!DI::config()->get('system', 'optimize_tables')) {
+               if (DI::config()->get('system', 'optimize_tables')) {
                        DBA::e("OPTIMIZE TABLE `parsed_url`");
                }
        }
index 8f5e55e226e48858b01c3d1d28e1e4172a1aaa91..762deadd73bb60b3e2e201952c9e06edcb6d0d3a 100644 (file)
@@ -91,7 +91,7 @@ class Cron
 
                        self::checkdeletedContacts();
 
-                       if (!DI::config()->get('system', 'optimize_tables')) {
+                       if (DI::config()->get('system', 'optimize_tables')) {
                                self::optimizeTables();
                        }