From: Philipp Holzer Date: Tue, 5 Feb 2019 21:27:56 +0000 (+0100) Subject: Refactoring ConfigCacheLoader methods X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7aa076074252cac1a7e6fa0bc5e667e1dfbc2e6c;p=friendica-addons.git Refactoring ConfigCacheLoader methods --- diff --git a/geonames/geonames.php b/geonames/geonames.php index b1d8278b..cf971984 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -79,7 +79,7 @@ function geonames_uninstall() { function geonames_load_config(\Friendica\App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('geonames', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('geonames')); } function geonames_post_hook($a, &$item) { diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index f004eb80..363515d3 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -38,7 +38,7 @@ function gravatar_uninstall() { function gravatar_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('gravatar', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('gravatar')); } /** diff --git a/impressum/impressum.php b/impressum/impressum.php index 49bf8264..07a0e073 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -54,7 +54,7 @@ function impressum_footer($a, &$b) { function impressum_load_config(\Friendica\App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('impressum', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('impressum')); } function impressum_show($a,&$b) { diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index cf6b4b4a..dfd9f59d 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -73,7 +73,7 @@ function ldapauth_uninstall() function ldapauth_load_config(\Friendica\App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('ldapauth', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('ldapauth')); } function ldapauth_hook_authenticate($a, &$b) diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 0edcc767..2ba32cc7 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -38,7 +38,7 @@ function libravatar_uninstall() function libravatar_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('libravatar', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('libravatar')); } /** diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 14cd411d..ab6ec27f 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -49,7 +49,7 @@ function openstreetmap_uninstall() function openstreetmap_load_config(\Friendica\App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('openstreetmap', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('openstreetmap')); } function openstreetmap_alterheader($a, &$navHtml) diff --git a/piwik/piwik.php b/piwik/piwik.php index 6341a702..9e43cd5f 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -54,7 +54,7 @@ function piwik_uninstall() { function piwik_load_config(\Friendica\App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('piwik', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('piwik')); } function piwik_analytics($a,&$b) { diff --git a/public_server/public_server.php b/public_server/public_server.php index bb294e3a..ec46e271 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -37,7 +37,7 @@ function public_server_uninstall() function public_server_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('public_server', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('public_server')); } function public_server_register_account($a, $b) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 428d626d..e2892568 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -380,7 +380,7 @@ function pumpio_settings_post(App $a, array &$b) function pumpio_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('pumpio', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('pumpio')); } function pumpio_hook_fork(App $a, array &$b) diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index bf670983..9fc04201 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -37,7 +37,7 @@ function testdrive_uninstall() { function testdrive_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('testdrive', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('testdrive')); } function testdrive_globaldir_update($a,&$b) { diff --git a/twitter/twitter.php b/twitter/twitter.php index fa9354ed..811d62ef 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -142,7 +142,7 @@ function twitter_uninstall() function twitter_load_config(App $a, Config\ConfigCacheLoader $loader) { - $a->getConfig()->loadConfigArray($loader->loadConfigFile('twitter', true)); + $a->getConfig()->loadConfigArray($loader->loadAddonConfig('twitter')); } function twitter_check_item_notification(App $a, array &$notification_data)