diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-15 19:17:18 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-15 22:29:30 +0400 |
commit | 3dc2e5626861e96071ba43ba9d0a1215a594a4ab (patch) | |
tree | 6fb83490a83d20f2caf85b31a11581e8c75d71b8 /core | |
parent | d0a6e2d8f19bfdfcb141b148a65e2328cb7f2da5 (diff) |
refs #5414 only find components of actually activated plugins. Wondering if this breaks any tests? make sure to cleanup plugin settings before uninstalling it. Otherwise cleanupPluginSettings cannot load the plugin
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/Manager.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index aa925215c4..5f87487290 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -293,7 +293,7 @@ class Manager extends Singleton */ public function findComponents($componentName, $expectedSubclass) { - $plugins = $this->getLoadedPlugins(); + $plugins = $this->getPluginsLoadedAndActivated(); $components = array(); foreach ($plugins as $plugin) { @@ -309,7 +309,7 @@ class Manager extends Singleton public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass) { - $plugins = $this->getLoadedPlugins(); + $plugins = $this->getPluginsLoadedAndActivated(); $found = array(); foreach ($plugins as $plugin) { @@ -338,6 +338,8 @@ class Manager extends Singleton } $this->returnLoadedPluginsInfo(); + \Piwik\Settings\Manager::cleanupPluginSettings($pluginName); + $this->executePluginDeactivate($pluginName); $this->executePluginUninstall($pluginName); @@ -348,7 +350,6 @@ class Manager extends Singleton $this->removePluginFromConfig($pluginName); Option::delete('version_' . $pluginName); - \Piwik\Settings\Manager::cleanupPluginSettings($pluginName); $this->clearCache($pluginName); self::deletePluginFromFilesystem($pluginName); @@ -561,6 +562,7 @@ class Manager extends Singleton ); $plugins[$pluginName] = $info; } + return $plugins; } |