]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Merge pull request #6964 from JeroenED/task/frio-sharestring-onchange
[friendica.git] / update.php
index 4ee85739d3bd71a8c0c461641b2f937abe215578..e619ec89dd9bbb569c3ecb4db27c863c16fdcab2 100644 (file)
@@ -12,7 +12,6 @@ use Friendica\Model\Contact;
 use Friendica\Model\GContact;
 use Friendica\Model\Item;
 use Friendica\Model\User;
-use Friendica\Util\Config\ConfigFileSaver;
 use Friendica\Util\DateTimeFormat;
 
 /**
@@ -347,36 +346,3 @@ function update_1298()
        }
        return Update::SUCCESS;
 }
-
-/**
- * @see https://github.com/friendica/friendica/pull/6815
- *
- * @return int Success
- */
-function update_1303()
-{
-       $app = \Friendica\BaseObject::getApp();
-       $configCache = $app->getConfigCache();
-       $configFileSaver = new ConfigFileSaver($app->getBasePath());
-
-       $updateConfigEntry = function($cat, $key) use ($configCache, $configFileSaver) {
-               // check if the config file differs from the whole configuration (= The db contains other values)
-               $fileConfig = $configCache->get($cat, $key);
-               if ($fileConfig === '!<unset>!') {
-                       $fileConfig = null;
-               }
-               $savedConfig = Config::get($cat, $key, null, true);
-               if ($fileConfig !== $savedConfig) {
-                       Logger::info('Difference in config found', ['cat' => $cat, 'key' => $key, 'file' => $fileConfig, 'saved' => $savedConfig]);
-                       $configFileSaver->addConfigValue($cat, $key, $savedConfig);
-               } else {
-                       Logger::info('No Difference in config found', ['cat' => $cat, 'key' => $key, 'value' => $fileConfig, 'saved' => $savedConfig]);
-               }
-       };
-
-       $configFileSaver->saveToConfigFile();
-
-       $updateConfigEntry('config', 'hostname');
-       $updateConfigEntry('system', 'basepath');
-       return Update::SUCCESS;
-}