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:
Diffstat (limited to 'core/Theme.php')
-rw-r--r--core/Theme.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/Theme.php b/core/Theme.php
index ed6261334c..e6eb8756c9 100644
--- a/core/Theme.php
+++ b/core/Theme.php
@@ -75,7 +75,8 @@ class Theme
public function rewriteAssetsPathToTheme($output)
{
- if ($this->themeName == \Piwik\Plugin\Manager::DEFAULT_THEME) {
+ if ($this->themeName == \Piwik\Plugin\Manager::DEFAULT_THEME
+ && !Manager::getAlternativeWebRootDirectories()) {
return $output;
}
@@ -140,6 +141,15 @@ class Theme
if (file_exists($fileToCheck)) {
return str_replace($pathAsset, $overridingAsset, $source);
}
+
+ // not rewritten by theme, but may be located in custom webroot directory
+ foreach (Manager::getAlternativeWebRootDirectories() as $absDir => $webRootDirectory) {
+ $withoutPlugins = str_replace('plugins/', '', $pathAsset);
+ if (file_exists($absDir . '/' . $withoutPlugins)) {
+ return $webRootDirectory . $withoutPlugins;
+ }
+ }
+
return $source;
}