From: Hypolite Petovan Date: Sun, 20 Nov 2022 17:44:53 +0000 (-0500) Subject: [various] Set config loaded from default values to SOURCE_STATIC X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2fc7356cf43a52ac91fa451f0e8a49f83bccf6df;p=friendica-addons.git [various] Set config loaded from default values to SOURCE_STATIC - This prevents from clobbering values loaded from base `config/` folder --- diff --git a/geonames/geonames.php b/geonames/geonames.php index 2ae845e5..2eb78fbd 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -35,7 +35,7 @@ function geonames_install() function geonames_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('geonames')); + $a->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function geonames_post_hook(App $a, array &$item) diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index 27e55002..d53e8ef8 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -28,7 +28,7 @@ function gravatar_install() { function gravatar_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('gravatar')); + $a->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } /** diff --git a/impressum/impressum.php b/impressum/impressum.php index 69beba59..6842f6fc 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -56,7 +56,7 @@ function impressum_footer(App $a, string &$body) function impressum_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('impressum')); + $a->getConfigCache()->load($loader->loadAddonConfig('impressum'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function impressum_show(App $a, string &$body) diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index 2935c74a..04ac00db 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -45,7 +45,7 @@ function ldapauth_install() function ldapauth_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('ldapauth')); + $a->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function ldapauth_hook_authenticate(App $a, array &$b) diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 1ddeccd4..f2a49ac8 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -26,7 +26,7 @@ function libravatar_install() function libravatar_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('libravatar')); + $a->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } /** diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index fe6ff9ae..e83e02c2 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -37,7 +37,7 @@ function openstreetmap_install() function openstreetmap_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap')); + $a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function openstreetmap_alterheader(App $a, &$navHtml) diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 72113e0a..30f10ff8 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -25,7 +25,7 @@ function phpmailer_install() function phpmailer_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('phpmailer')); + $a->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } /** diff --git a/piwik/piwik.php b/piwik/piwik.php index 047e41a3..370121d7 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -50,7 +50,7 @@ function piwik_install() { function piwik_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('piwik')); + $a->getConfigCache()->load($loader->loadAddonConfig('piwik'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function piwik_analytics(App $a, string &$b) diff --git a/public_server/public_server.php b/public_server/public_server.php index cc85ba60..95e1e8dd 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -29,7 +29,7 @@ function public_server_install() function public_server_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('public_server')); + $a->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function public_server_register_account(App $a, $b) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 4928b5e4..f5c2b14e 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -320,7 +320,7 @@ function pumpio_settings_post(App $a, array &$b) function pumpio_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('pumpio')); + $a->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function pumpio_hook_fork(App $a, array &$b) diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index 94e63dda..903f80b1 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -27,7 +27,7 @@ function testdrive_install() function testdrive_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('testdrive')); + $a->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function testdrive_globaldir_update(App $a, array &$b) diff --git a/twitter/twitter.php b/twitter/twitter.php index 99985d97..39e5b447 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -125,7 +125,7 @@ function twitter_install() function twitter_load_config(App $a, ConfigFileLoader $loader) { - $a->getConfigCache()->load($loader->loadAddonConfig('twitter')); + $a->getConfigCache()->load($loader->loadAddonConfig('twitter'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function twitter_check_item_notification(App $a, array &$notification_data)