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
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-02-21 05:03:34 +0400
committermattab <matthieu.aubry@gmail.com>2014-02-21 05:03:34 +0400
commitd90f41b8c306648ec63cb3847154a5bb1bda5b8d (patch)
tree8ccd261c2f7845b06d5bc5b13ca06df6d54fe610
parent13a4576d339d817289f279b36ba3c15600a0fa20 (diff)
Build should be green now!
-rw-r--r--core/Plugin/Manager.php26
-rw-r--r--tests/PHPUnit/Core/ReleaseCheckListTest.php4
2 files changed, 21 insertions, 9 deletions
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 6c6578fe6e..ff001629e5 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -68,30 +68,45 @@ class Manager extends Singleton
'ExampleUI',
'ExampleVisualization',
'ExamplePluginTemplate',
+ );
+
+ protected $coreThemesDisabledByDefault = array(
'ExampleTheme',
'LeftMenu',
+ 'Zeitgeist',
);
public function getPluginsToLoadDuringTests()
{
$toLoad = array();
foreach($this->readPluginsDirectory() as $plugin) {
+
+ // Load all default plugins
$isPluginBundledWithCore = $this->isPluginBundledWithCore($plugin);
+
+ // Load plugins from submodules
$isPluginOfficiallySupported = $this->isPluginOfficialAndNotBundledWithCore($plugin);
// Do not enable other Login plugins
$isPluginOfficiallySupported = $isPluginOfficiallySupported && strpos($plugin, 'Login') === false;
- if($isPluginBundledWithCore || $isPluginOfficiallySupported) {
+ $loadPlugin = $isPluginBundledWithCore || $isPluginOfficiallySupported;
+
+ // Do not enable other Themes
+ $isThemeDisabled = in_array($plugin, $this->coreThemesDisabledByDefault);
+ $loadPlugin = $loadPlugin && !$isThemeDisabled;
+
+ if($loadPlugin) {
$toLoad[] = $plugin;
}
}
return $toLoad;
}
+
public function getCorePluginsDisabledByDefault()
{
- return $this->corePluginsDisabledByDefault;
+ return array_merge( $this->corePluginsDisabledByDefault, $this->coreThemesDisabledByDefault);
}
// If a plugin hooks onto at least an event starting with "Tracker.", we load the plugin during tracker
@@ -384,10 +399,11 @@ class Manager extends Singleton
{
$plugins = $this->getLoadedPlugins();
- foreach ($plugins as $plugin)
- if ($plugin->isTheme() && $plugin->getPluginName() == $themeName)
+ foreach ($plugins as $plugin) {
+ if ($plugin->isTheme() && $plugin->getPluginName() == $themeName) {
return new Theme($plugin);
-
+ }
+ }
throw new \Exception('Theme not found : ' . $themeName);
}
diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php
index 284810f3c3..9f756a0a6c 100644
--- a/tests/PHPUnit/Core/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php
@@ -190,10 +190,6 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase
// if not added to git, then it is not part of the release checklist.
continue;
}
-
- if($pluginName === \Piwik\Plugin\Manager::DEFAULT_THEME) {
- continue;
- }
$manager = \Piwik\Plugin\Manager::getInstance();
$disabled = in_array($pluginName, $manager->getCorePluginsDisabledByDefault());