From 6a5312aca9b339f7ed10a16bc352aafe99482044 Mon Sep 17 00:00:00 2001 From: Eliseu Amaro Date: Wed, 26 Jan 2022 18:46:31 +0000 Subject: [PATCH] [CORE][GNUsocial] social.local.yaml is now updated with the proper node name --- src/Core/GNUsocial.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index 667cf63295..0e62cc816c 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -228,7 +228,8 @@ class GNUsocial implements EventSubscriberInterface // Overriding doesn't work as we want, overrides the top-most key, do it manually $local_file = INSTALLDIR . '/social.local.yaml'; if (!file_exists($local_file)) { - file_put_contents($local_file, "parameters:\n locals:\n gnusocial:\n"); + $node_name = $_ENV['SOCIAL_NODE_NAME']; + file_put_contents($local_file, "parameters:\n locals:\n gnusocial:\n site:\n name: {$node_name}\n"); } // Load .local @@ -244,7 +245,7 @@ class GNUsocial implements EventSubscriberInterface $module_configs = ModuleManager::configureContainer($container, $loader); // Merge parameter $from with values already set in $to - $merge_local_config = function ($from, $to = null) use ($container, $locals) { + $merge_local_config = static function ($from, $to = null) use ($container, $locals) { $to ??= $from; $wrapper = $container->hasParameter($to) ? $container->getParameter($to) : []; $content = [$from => $container->getParameter($from)];