From 005f9af69bb38b9b9a30a0aa7c672a7cabdf3c58 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 1 Jan 2023 20:21:56 +0100 Subject: [PATCH] Introduce ConfigFileManager for config files --- geonames/geonames.php | 4 ++-- gravatar/gravatar.php | 4 ++-- impressum/impressum.php | 4 ++-- ldapauth/ldapauth.php | 4 ++-- libravatar/libravatar.php | 4 ++-- openstreetmap/openstreetmap.php | 4 ++-- phpmailer/phpmailer.php | 4 ++-- piwik/piwik.php | 4 ++-- public_server/public_server.php | 4 ++-- pumpio/pumpio.php | 4 ++-- testdrive/testdrive.php | 4 ++-- twitter/twitter.php | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/geonames/geonames.php b/geonames/geonames.php index 2eb78fbd..c3ba1ca8 100644 --- a/geonames/geonames.php +++ b/geonames/geonames.php @@ -11,7 +11,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\XML; function geonames_install() @@ -33,7 +33,7 @@ function geonames_install() Hook::register('addon_settings_post', __FILE__, 'geonames_addon_settings_post'); } -function geonames_load_config(App $a, ConfigFileLoader $loader) +function geonames_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index d53e8ef8..25d342a7 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -13,7 +13,7 @@ use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\Strings; /** @@ -26,7 +26,7 @@ function gravatar_install() { Logger::notice("registered gravatar in avatar_lookup hook"); } -function gravatar_load_config(App $a, ConfigFileLoader $loader) +function gravatar_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/impressum/impressum.php b/impressum/impressum.php index 6842f6fc..d7298cb8 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -13,7 +13,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\Proxy as ProxyUtils; function impressum_install() @@ -54,7 +54,7 @@ function impressum_footer(App $a, string &$body) } } -function impressum_load_config(App $a, ConfigFileLoader $loader) +function impressum_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('impressum'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index 04ac00db..17ff4e47 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -35,7 +35,7 @@ use Friendica\Core\Logger; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\User; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; function ldapauth_install() { @@ -43,7 +43,7 @@ function ldapauth_install() Hook::register('authenticate', 'addon/ldapauth/ldapauth.php', 'ldapauth_hook_authenticate'); } -function ldapauth_load_config(App $a, ConfigFileLoader $loader) +function ldapauth_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index f2a49ac8..141ce737 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -12,7 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; /** * Installs the addon hook @@ -24,7 +24,7 @@ function libravatar_install() Logger::notice("registered libravatar in avatar_lookup hook"); } -function libravatar_load_config(App $a, ConfigFileLoader $loader) +function libravatar_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index e83e02c2..cb3ae5de 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -15,7 +15,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\Strings; const OSM_TMS = 'https://www.openstreetmap.org'; @@ -35,7 +35,7 @@ function openstreetmap_install() Logger::notice("installed openstreetmap"); } -function openstreetmap_load_config(App $a, ConfigFileLoader $loader) +function openstreetmap_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 30f10ff8..46ae1df3 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -11,7 +11,7 @@ use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Object\EMail\IEmail; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; @@ -23,7 +23,7 @@ function phpmailer_install() Hook::register('emailer_send_prepare', __FILE__, 'phpmailer_emailer_send_prepare', 5); } -function phpmailer_load_config(App $a, ConfigFileLoader $loader) +function phpmailer_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/piwik/piwik.php b/piwik/piwik.php index 370121d7..23255c18 100644 --- a/piwik/piwik.php +++ b/piwik/piwik.php @@ -39,7 +39,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; function piwik_install() { Hook::register('load_config', 'addon/piwik/piwik.php', 'piwik_load_config'); @@ -48,7 +48,7 @@ function piwik_install() { Logger::notice("installed piwik addon"); } -function piwik_load_config(App $a, ConfigFileLoader $loader) +function piwik_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('piwik'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/public_server/public_server.php b/public_server/public_server.php index 95e1e8dd..8d0a80f5 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -15,7 +15,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\DateTimeFormat; function public_server_install() @@ -27,7 +27,7 @@ function public_server_install() Hook::register('logged_in', 'addon/public_server/public_server.php', 'public_server_login'); } -function public_server_load_config(App $a, ConfigFileLoader $loader) +function public_server_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index b13d5faf..6ff7a12e 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -26,7 +26,7 @@ use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Network\HTTPClient\Client\HttpClientOptions; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityNamespace; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; use Friendica\Util\XML; @@ -318,7 +318,7 @@ function pumpio_settings_post(App $a, array &$b) } } -function pumpio_load_config(App $a, ConfigFileLoader $loader) +function pumpio_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index 903f80b1..27ef45e7 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -13,7 +13,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Notification; use Friendica\Model\User; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Util\DateTimeFormat; function testdrive_install() @@ -25,7 +25,7 @@ function testdrive_install() Hook::register('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update'); } -function testdrive_load_config(App $a, ConfigFileLoader $loader) +function testdrive_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } diff --git a/twitter/twitter.php b/twitter/twitter.php index 2e7c1573..a8a45aca 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -86,7 +86,7 @@ use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; use Friendica\Protocol\Activity; -use Friendica\Core\Config\Util\ConfigFileLoader; +use Friendica\Core\Config\Util\ConfigFileManager; use Friendica\Core\System; use Friendica\Model\Photo; use Friendica\Util\DateTimeFormat; @@ -124,7 +124,7 @@ function twitter_install() // Hook functions -function twitter_load_config(App $a, ConfigFileLoader $loader) +function twitter_load_config(App $a, ConfigFileManager $loader) { $a->getConfigCache()->load($loader->loadAddonConfig('twitter'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); }