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/PluginsArchiver.php')
-rw-r--r--core/PluginsArchiver.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/PluginsArchiver.php b/core/PluginsArchiver.php
index 981c6fbce5..e54201c4ef 100644
--- a/core/PluginsArchiver.php
+++ b/core/PluginsArchiver.php
@@ -39,8 +39,11 @@ abstract class PluginsArchiver
// todo: review this concept, each plugin should somehow maintain the list of report names they generate
public function shouldArchive()
{
- $pluginName = Common::unprefixClass(get_class($this));
- $pluginName = str_replace("_Archiver", "", $pluginName);
+ $className = get_class($this);
+ $pluginName = str_replace(array("Piwik\\Plugins\\", "\\Archiver"), "", $className);
+ if(strpos($pluginName, "\\") !== false) {
+ throw new \Exception("unexpected plugin name $pluginName in shouldArchive()");
+ }
return $this->getProcessor()->shouldProcessReportsForPlugin($pluginName);
}