Move Config::get() to DI::config()->get()

This commit is contained in:
nupplaPhil 2020-01-19 21:21:12 +01:00
parent c67ad31c8b
commit 1ce63185ab
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
38 changed files with 342 additions and 342 deletions

View file

@ -32,11 +32,11 @@ function geocoordinates_resolve_item(&$item)
if((!$item["coord"]) || ($item["location"]))
return;
$key = Config::get("geocoordinates", "api_key");
$key = DI::config()->get("geocoordinates", "api_key");
if ($key == "")
return;
$language = Config::get("geocoordinates", "language");
$language = DI::config()->get("geocoordinates", "language");
if ($language == "")
$language = "de";
@ -93,8 +93,8 @@ function geocoordinates_addon_admin(&$a, &$o)
$o = Renderer::replaceMacros($t, [
'$submit' => DI::l10n()->t('Save Settings'),
'$api_key' => ['api_key', DI::l10n()->t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
'$language' => ['language', DI::l10n()->t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
'$api_key' => ['api_key', DI::l10n()->t('API Key'), DI::config()->get('geocoordinates', 'api_key'), ''],
'$language' => ['language', DI::l10n()->t('Language code (IETF format)'), DI::config()->get('geocoordinates', 'language'), ''],
]);
}