diff options
Diffstat (limited to 'core/PluginsArchiver.php')
-rw-r--r-- | core/PluginsArchiver.php | 7 |
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); } |