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
diff options
context:
space:
mode:
Diffstat (limited to 'core/Plugin.php')
-rw-r--r--core/Plugin.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/Plugin.php b/core/Plugin.php
index ff938a659f..f5a2854d4f 100644
--- a/core/Plugin.php
+++ b/core/Plugin.php
@@ -137,17 +137,22 @@ class Plugin
if ($cache->contains($cacheId)) {
$this->pluginInformation = $cache->fetch($cacheId);
} else {
- $metadataLoader = new MetadataLoader($pluginName);
- $this->pluginInformation = $metadataLoader->load();
-
- if ($this->hasDefinedPluginInformationInPluginClass() && $metadataLoader->hasPluginJson()) {
- throw new \Exception('Plugin ' . $pluginName . ' has defined the method getInformation() and as well as having a plugin.json file. Please delete the getInformation() method from the plugin class. Alternatively, you may delete the plugin directory from plugins/' . $pluginName);
- }
+ $this->reloadPluginInformation();
$cache->save($cacheId, $this->pluginInformation);
}
}
+ public function reloadPluginInformation()
+ {
+ $metadataLoader = new MetadataLoader($this->pluginName);
+ $this->pluginInformation = $metadataLoader->load();
+
+ if ($this->hasDefinedPluginInformationInPluginClass() && $metadataLoader->hasPluginJson()) {
+ throw new \Exception('Plugin ' . $this->pluginName . ' has defined the method getInformation() and as well as having a plugin.json file. Please delete the getInformation() method from the plugin class. Alternatively, you may delete the plugin directory from plugins/' . $this->pluginName);
+ }
+ }
+
private function createCacheIfNeeded()
{
if (is_null($this->cache)) {