diff --git a/src/Core/Config.php b/src/Core/Config.php index 0dd4b2276..f64104716 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -19,16 +19,4 @@ use Friendica\DI; */ class Config { - /** - * Deletes the given key from the system configuration. - * - * @param string $cat The category of the configuration value - * @param string $key The configuration key to delete - * - * @return bool - */ - public static function delete($cat, $key) - { - return DI::config()->delete($cat, $key); - } } diff --git a/src/Module/Admin/Features.php b/src/Module/Admin/Features.php index 79d6e43f5..b73e35f54 100644 --- a/src/Module/Admin/Features.php +++ b/src/Module/Admin/Features.php @@ -34,7 +34,7 @@ class Features extends BaseAdminModule if (!empty($_POST[$featurelock])) { DI::config()->set('feature_lock', $feature, $val); } else { - Config::delete('feature_lock', $feature); + DI::config()->delete('feature_lock', $feature); } } } diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index 915eaa504..035c7c6e0 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -297,13 +297,13 @@ class Site extends BaseAdminModule DI::config()->set('system', 'touch_icon' , $touch_icon); if ($banner == "") { - Config::delete('system', 'banner'); + DI::config()->delete('system', 'banner'); } else { DI::config()->set('system', 'banner', $banner); } if (empty($additional_info)) { - Config::delete('config', 'info'); + DI::config()->delete('config', 'info'); } else { DI::config()->set('config', 'info', $additional_info); } @@ -312,12 +312,12 @@ class Site extends BaseAdminModule Theme::install($theme); if ($theme_mobile == '---') { - Config::delete('system', 'mobile-theme'); + DI::config()->delete('system', 'mobile-theme'); } else { DI::config()->set('system', 'mobile-theme', $theme_mobile); } if ($singleuser == '---') { - Config::delete('system', 'singleuser'); + DI::config()->delete('system', 'singleuser'); } else { DI::config()->set('system', 'singleuser', $singleuser); } @@ -417,7 +417,7 @@ class Site extends BaseAdminModule if (strlen(DI::config()->get('system', 'directory_submit_url')) && !strlen(DI::config()->get('system', 'directory'))) { DI::config()->set('system', 'directory', dirname(DI::config()->get('system', 'directory_submit_url'))); - Config::delete('system', 'directory_submit_url'); + DI::config()->delete('system', 'directory_submit_url'); } /* Installed themes */ diff --git a/src/Network/FKOAuthDataStore.php b/src/Network/FKOAuthDataStore.php index 6f0a1ed83..ff6a1e216 100644 --- a/src/Network/FKOAuthDataStore.php +++ b/src/Network/FKOAuthDataStore.php @@ -177,7 +177,7 @@ class FKOAuthDataStore extends OAuthDataStore DBA::delete('tokens', ['id' => $token->key]); if (!is_null($ret) && !is_null($uverifier)) { - Config::delete("oauth", $verifier); + DI::config()->delete("oauth", $verifier); } return $ret; diff --git a/update.php b/update.php index a40d19785..a038edf21 100644 --- a/update.php +++ b/update.php @@ -89,7 +89,7 @@ function update_1189() if (strlen(DI::config()->get('system', 'directory_submit_url')) && !strlen(DI::config()->get('system', 'directory'))) { DI::config()->set('system', 'directory', dirname(DI::config()->get('system', 'directory_submit_url'))); - Config::delete('system', 'directory_submit_url'); + DI::config()->delete('system', 'directory_submit_url'); } return Update::SUCCESS; @@ -420,7 +420,7 @@ function update_1330() } // try to delete the class since it isn't needed. This won't work with config files - Config::delete('storage', 'class'); + DI::config()->delete('storage', 'class'); } // Update attachments and photos