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:
authorThomas Steur <tsteur@users.noreply.github.com>2019-03-15 01:24:36 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-03-15 01:24:36 +0300
commit6395855aa7f3813cc7f413a18d31505ea26ba32a (patch)
tree2a3157954dd3c29cc024bf7093df53b63be94dd6 /core/Plugin.php
parentd7c932710e690d87ea62c3ec94ae65fa5bd05b05 (diff)
Support multiple plugin paths (#14051)
* do not hard code plugins directory * remove method that is not needed for now * use plugins directory in more places * some work on supporting multiple plugin directories * use more unique name * couple fixes * and another fix * sort plugins * adjust languagesmanager * adjust more usages * Update Manager.php * adding a plugin to test * more tests * make sure plugin resources can be located in custom directory * adding more tests * rewrite image paths * handle more cases * add tests * make sure to load plugin * trying to fix test * trying it this way * load plugin * fix ui test? * testing if tests succeed this way * another test * load custom dir plugin * load plugin in ui fixture * change the update statement * remove update script * delete column * fix ui test * make it work for tests * fix some tests * Fix merge.
Diffstat (limited to 'core/Plugin.php')
-rw-r--r--core/Plugin.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Plugin.php b/core/Plugin.php
index fcfdc612a7..c0ac9ecb0a 100644
--- a/core/Plugin.php
+++ b/core/Plugin.php
@@ -355,9 +355,9 @@ class Plugin
$cacheId = 'Plugin' . $this->pluginName . $componentName . $expectedSubclass;
- $pluginsDir = Manager::getPluginsDirectory();
+ $pluginsDir = Manager::getPluginDirectory($this->pluginName);
- $componentFile = sprintf('%s%s/%s.php', $pluginsDir, $this->pluginName, $componentName);
+ $componentFile = sprintf('%s/%s.php', $pluginsDir, $componentName);
if ($this->cache->contains($cacheId)) {
$classname = $this->cache->fetch($cacheId);
@@ -537,8 +537,9 @@ class Plugin
{
$components = array();
- $pluginsDir = Manager::getPluginsDirectory();
- $baseDir = $pluginsDir . $this->pluginName . '/' . $directoryWithinPlugin;
+ $pluginsDir = Manager::getPluginDirectory($this->pluginName);
+ $baseDir = $pluginsDir . '/' . $directoryWithinPlugin;
+
$files = Filesystem::globr($baseDir, '*.php');
foreach ($files as $file) {