diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-12-16 06:20:02 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-12-16 06:20:02 +0300 |
commit | c78ec077ffa09e9d1e1cbdb53269c85897e3f19a (patch) | |
tree | 3fa34aaeb3b44476bfa867fcbafd7f860726ece4 | |
parent | 871309c44462f389ea1dbc127764f2c66b640ce5 (diff) |
Trying to fix error on beta7 upgrade that killed the Plugins[] section of config file
-rw-r--r-- | core/Plugin/Manager.php | 5 | ||||
-rw-r--r-- | core/Updates/2.10.0-b7.php | 7 | ||||
-rw-r--r-- | core/Updates/2.10.0-b8.php | 26 | ||||
-rw-r--r-- | core/Version.php | 2 | ||||
m--------- | tests/PHPUnit/UI | 0 |
5 files changed, 31 insertions, 9 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index 4beee901c2..a85784f6d4 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -203,7 +203,7 @@ class Manager extends Singleton /** * Update Plugins config * - * @param array $plugins Plugins + * @param array $pluginsToLoad Plugins */ private function updatePluginsConfig($pluginsToLoad) { @@ -1405,6 +1405,9 @@ class Manager extends Singleton private function sortPluginsSameOrderAsGlobalConfig(array $plugins) { $global = $this->getPluginsFromGlobalIniConfigFile(); + if(empty($global)) { + return $plugins; + } $global = array_values($global); $plugins = array_values($plugins); diff --git a/core/Updates/2.10.0-b7.php b/core/Updates/2.10.0-b7.php index 21a5e7b1af..a44117fc81 100644 --- a/core/Updates/2.10.0-b7.php +++ b/core/Updates/2.10.0-b7.php @@ -38,13 +38,6 @@ class Updates_2_10_0_b7 extends Updates static function update() { Updater::updateDatabase(__FILE__, self::getSql()); - - $pluginManager = \Piwik\Plugin\Manager::getInstance(); - - try { - $pluginManager->activatePlugin('Resolution'); - } catch(\Exception $e) { - } } } diff --git a/core/Updates/2.10.0-b8.php b/core/Updates/2.10.0-b8.php new file mode 100644 index 0000000000..17705f8143 --- /dev/null +++ b/core/Updates/2.10.0-b8.php @@ -0,0 +1,26 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Updates; + +use Piwik\Updates; + +class Updates_2_10_0_b8 extends Updates +{ + static function update() + { + $pluginManager = \Piwik\Plugin\Manager::getInstance(); + + try { + $pluginManager->activatePlugin('Resolution'); + } catch(\Exception $e) { + } + } + +} diff --git a/core/Version.php b/core/Version.php index 7b382341ef..6708ff9f70 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,5 +20,5 @@ final class Version * The current Piwik version. * @var string */ - const VERSION = '2.10.0-b7'; + const VERSION = '2.10.0-b8'; } diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI -Subproject 15cd3e0f808e6fb3914f35cfd5f94dfba008ec8 +Subproject a7e500e0af64af4b38dff2c13c4282766a3e2e7 |