diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-11-28 03:47:29 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-11-28 03:47:29 +0400 |
commit | cb575fb6994be6edd9728ab78075c611791d05c4 (patch) | |
tree | ec20c6b950a47aab1b9f349788770c3312b5e610 /core | |
parent | d890428f4a063c1c75e0eee41319deb978f9c8e8 (diff) |
fix assets of loaded but not activated plugins are executed, make sure to remove Referers and PDFReports from plugin config
Diffstat (limited to 'core')
-rw-r--r-- | core/EventDispatcher.php | 2 | ||||
-rw-r--r-- | core/Plugin/Manager.php | 15 | ||||
-rw-r--r-- | core/Updates/2.0-b10.php | 26 |
3 files changed, 42 insertions, 1 deletions
diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php index 670269862a..d0c2112255 100644 --- a/core/EventDispatcher.php +++ b/core/EventDispatcher.php @@ -66,7 +66,7 @@ class EventDispatcher extends Singleton } if (empty($plugins)) { - $plugins = \Piwik\Plugin\Manager::getInstance()->getLoadedPlugins(); + $plugins = \Piwik\Plugin\Manager::getInstance()->getActivatedPlugins(); } $callbacks = array(); diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index 71d46afc33..2751d7c142 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -566,6 +566,21 @@ class Manager extends Singleton } /** + * Returns a list of all names of currently activated plugin eg, + * + * array( + * 'UserCountry' + * 'UserSettings' + * ); + * + * @return string[] + */ + public function getActivatedPlugins() + { + return $this->pluginsToLoad; + } + + /** * Returns a Plugin object by name. * * @param string $name The name of the plugin, eg, `'Actions'`. diff --git a/core/Updates/2.0-b10.php b/core/Updates/2.0-b10.php new file mode 100644 index 0000000000..d307c6118a --- /dev/null +++ b/core/Updates/2.0-b10.php @@ -0,0 +1,26 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + * @category Piwik + * @package Piwik + */ + +namespace Piwik\Updates; + +use Piwik\Updates; + +/** + * @package Updates + */ +class Updates_2_0_b10 extends Updates +{ + static function update() + { + parent::deletePluginFromConfigFile('Referers'); + parent::deletePluginFromConfigFile('PDFReports'); + } +} |