]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Use a thousands_separator to improve readability of the federation statistics
[friendica.git] / update.php
index 203e4a45f09763a9f848f36270bb793401bdd5c1..7b5f6778be7df92807978de0e88126016fa10e9f 100644 (file)
@@ -1070,3 +1070,20 @@ function update_1444()
 
        return Update::SUCCESS;
 }
+
+function update_1446()
+{
+       $distributed_cache_driver_source = DI::config()->getCache()->getSource('system', 'distributed_cache_driver');
+       $cache_driver_source = DI::config()->getCache()->getSource('system', 'cache_driver');
+
+       // In case the distributed cache driver is the default value, but the current cache driver isn't default,
+       // we assume that the distributed cache driver should be the same as the current cache driver
+       if (
+               $distributed_cache_driver_source === \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC
+               && $cache_driver_source > \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC
+       ) {
+               DI::config()->set('system', 'distributed_cache_driver', DI::config()->get('system', 'cache_driver'));
+       }
+
+       return Update::SUCCESS;
+}