Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2021-05-27 07:54:35 +0300
committerGitHub <noreply@github.com>2021-05-27 07:54:35 +0300
commit441f22f2a4ed2288c34a8ca5fdab5493f9dea1fb (patch)
treec3931e0b5034ff33be87dfa51aa8a25fc6b2a950 /core
parent7f250ac219fe725b9f84cfa18d50e020ab555d32 (diff)
in cache buster only look at activated plugins, not loaded plugins (#16880)
Diffstat (limited to 'core')
-rw-r--r--core/AssetManager/UIAssetCacheBuster.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/AssetManager/UIAssetCacheBuster.php b/core/AssetManager/UIAssetCacheBuster.php
index 370adbc1d5..b63de3f462 100644
--- a/core/AssetManager/UIAssetCacheBuster.php
+++ b/core/AssetManager/UIAssetCacheBuster.php
@@ -33,14 +33,17 @@ class UIAssetCacheBuster extends Singleton
$masterFile = PIWIK_INCLUDE_PATH . '/.git/refs/heads/master';
$currentGitHash = file_exists($masterFile) ? @file_get_contents($masterFile) : null;
+ $manager = Manager::getInstance();
- $plugins = !$pluginNames ? Manager::getInstance()->getLoadedPluginsName() : $pluginNames;
+ $plugins = !$pluginNames ? $manager->getActivatedPlugins() : $pluginNames;
sort($plugins);
$pluginsInfo = '';
foreach ($plugins as $pluginName) {
- $plugin = Manager::getInstance()->getLoadedPlugin($pluginName);
- $pluginsInfo .= $plugin->getPluginName() . $plugin->getVersion() . ',';
+ if ($manager->isPluginLoaded($pluginName)) {
+ $plugin = $manager->getLoadedPlugin($pluginName);
+ $pluginsInfo .= $plugin->getPluginName() . $plugin->getVersion() . ',';
+ }
}
$cacheBuster = md5($pluginsInfo . PHP_VERSION . Version::VERSION . trim($currentGitHash));
@@ -51,7 +54,7 @@ class UIAssetCacheBuster extends Singleton
$cachedCacheBuster = $cacheBuster;
}
-
+
return $cachedCacheBuster;
}