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:
authormattab <matthieu.aubry@gmail.com>2014-01-13 12:07:26 +0400
committermattab <matthieu.aubry@gmail.com>2014-01-13 12:07:26 +0400
commit04ef2aee1e9337086b91938498eb03210f3d0d5b (patch)
treeda6d3d125d8ccbfbd20ee3afe3e418772eac49d5 /core
parent1b64b10747f1d37a6c106804e1a565050db9311f (diff)
Fix bug when upgrading and disabling DNT+AnonymizeIP have failed
Diffstat (limited to 'core')
-rw-r--r--core/Plugin/Manager.php27
1 files changed, 22 insertions, 5 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 87eeaa0e4b..c25a3d8d2d 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -434,6 +434,12 @@ class Manager extends Singleton
);
$listPlugins = array_unique($listPlugins);
foreach ($listPlugins as $pluginName) {
+
+ // Hide plugins that are never going to be used
+ if($this->isPluginBogus($pluginName)) {
+ continue;
+ }
+
// If the plugin is not core and looks bogus, do not load
if ($this->isPluginThirdPartyAndBogus($pluginName)) {
$info = array(
@@ -493,11 +499,8 @@ class Manager extends Singleton
if($this->isPluginBundledWithCore($pluginName)) {
return false;
}
- $bogusPlugins = array(
- 'PluginMarketplace' //defines a plugin.json but 1.x Piwik plugin
- );
- if(in_array($pluginName, $bogusPlugins)) {
- return true;
+ if($this->isPluginBogus($pluginName)) {
+ return true;
}
$path = $this->getPluginsDirectory() . $pluginName;
@@ -1027,6 +1030,20 @@ class Manager extends Singleton
return $translations;
}
+
+ /**
+ * @param $pluginName
+ * @return bool
+ */
+ private function isPluginBogus($pluginName)
+ {
+ $bogusPlugins = array(
+ 'PluginMarketplace', //defines a plugin.json but 1.x Piwik plugin
+ 'DoNotTrack', // Removed in 2.0.3
+ 'AnonymizeIP', // Removed in 2.0.3
+ );
+ return in_array($pluginName, $bogusPlugins);
+ }
}
/**