diff --git a/config/environment/ui-test.php b/config/environment/ui-test.php index a1b9bd50145..2a631289436 100644 --- a/config/environment/ui-test.php +++ b/config/environment/ui-test.php @@ -19,13 +19,13 @@ 'tests.ui.url_normalizer_blacklist.controller' => [], // disable check for plugin updates during UI tests, allow for override - 'dev.disable_plugin_update_checks' => Piwik\DI::decorate(function ($previous, Container $c) { - return !$c->get('test.vars.forceEnablePluginUpdateChecks'); + 'dev.forced_plugin_update_result' => Piwik\DI::decorate(function ($previous, Container $c) { + return $c->get('test.vars.forceEnablePluginUpdateChecks') ? null : []; }), 'twig.cache' => function (\Piwik\Container\Container $container) { $templatesPath = $container->get('path.tmp.templates'); - return new class($templatesPath) extends \Twig\Cache\FilesystemCache { + return new class ($templatesPath) extends \Twig\Cache\FilesystemCache { public function write(string $key, string $content): void { $retryCount = 3; diff --git a/config/global.php b/config/global.php index 6296a473d1d..f2d87b5d34f 100644 --- a/config/global.php +++ b/config/global.php @@ -110,7 +110,7 @@ 'observers.global' => [], - 'dev.disable_plugin_update_checks' => false, + 'dev.forced_plugin_update_result' => null, /** * By setting this option to false, the check that the DB schema version matches the version of the source code will diff --git a/plugins/CorePluginsAdmin/Menu.php b/plugins/CorePluginsAdmin/Menu.php index c6e85520be4..2980e764692 100644 --- a/plugins/CorePluginsAdmin/Menu.php +++ b/plugins/CorePluginsAdmin/Menu.php @@ -52,8 +52,7 @@ public function configureAdminMenu(MenuAdmin $menu) $pluginsUpdateMessage = ''; - $skipPluginUpdateCheck = StaticContainer::get('dev.disable_plugin_update_checks'); - if (!$skipPluginUpdateCheck && $hasSuperUserAccess && $isMarketplaceEnabled && $this->marketplacePlugins) { + if ($hasSuperUserAccess && $isMarketplaceEnabled && $this->marketplacePlugins) { $pluginsHavingUpdate = $this->marketplacePlugins->getPluginsHavingUpdate(); if (!empty($pluginsHavingUpdate)) { diff --git a/plugins/CorePluginsAdmin/templates/plugins.twig b/plugins/CorePluginsAdmin/templates/plugins.twig index 5d0540b4c21..d49517b2895 100644 --- a/plugins/CorePluginsAdmin/templates/plugins.twig +++ b/plugins/CorePluginsAdmin/templates/plugins.twig @@ -25,6 +25,7 @@ plugin-update-nonces="{{ pluginUpdateNonces|default({})|json_encode }}" update-nonce="{{ updateNonce|json_encode }}" is-multi-server-environment="{{ isMultiServerEnvironment|default(false)|json_encode }}" + is-plugins-admin-enabled="{{ isPluginsAdminEnabled|default(null)|json_encode }}" >
{{ translate('CorePluginsAdmin_InfoPluginUpdateIsRecommended') }}
-