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
path: root/core
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-03-17 04:21:09 +0300
committerGitHub <noreply@github.com>2022-03-17 04:21:09 +0300
commit39d5fbab4aaf6c4728ba4b42ed818bb4652f4f68 (patch)
tree60eac15e9c1b2dbf6441ebda308f24f2f9ed011e /core
parentf3c9ee7652cad18ce815d60fdc564bcdd076c10b (diff)
[Vue] migrate LanguagesManager to vue (#18931)
* migrate translation search directive to vue * Allow specifying usable components in vue-entry and use in LanguagesManager configuration.twig * migrate language selector, fix prop type in personalsettings.vue, and get selector to work in installation * built vue files
Diffstat (limited to 'core')
-rw-r--r--core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php34
1 files changed, 22 insertions, 12 deletions
diff --git a/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php b/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
index 6834d2923f..f86f7f5102 100644
--- a/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
+++ b/core/AssetManager/UIAssetFetcher/PluginUmdAssetFetcher.php
@@ -176,21 +176,31 @@ class PluginUmdAssetFetcher extends UIAssetFetcher
$plugins = self::orderPluginsByPluginDependencies($plugins, false);
foreach ($plugins as $plugin) {
- $pluginDir = self::getRelativePluginDirectory($plugin);
+ $fileLocation = self::getUmdFileToUseForPlugin($plugin);
+ if ($fileLocation) {
+ $this->fileLocations[] = $fileLocation;
+ }
+ }
+ }
- $devUmd = "$pluginDir/vue/dist/$plugin.development.umd.js";
- $minifiedUmd = "$pluginDir/vue/dist/$plugin.umd.min.js";
- $umdSrcFolder = "$pluginDir/vue/src";
-
- // in case there are dist files but no src files, which can happen during development
- if (is_dir(PIWIK_INCLUDE_PATH . '/' . $umdSrcFolder)) {
- if (Development::isEnabled() && is_file(PIWIK_INCLUDE_PATH . '/' . $devUmd)) {
- $this->fileLocations[] = $devUmd;
- } else if (is_file(PIWIK_INCLUDE_PATH . '/' . $minifiedUmd)) {
- $this->fileLocations[] = $minifiedUmd;
- }
+ public static function getUmdFileToUseForPlugin($plugin)
+ {
+ $pluginDir = self::getRelativePluginDirectory($plugin);
+
+ $devUmd = "$pluginDir/vue/dist/$plugin.development.umd.js";
+ $minifiedUmd = "$pluginDir/vue/dist/$plugin.umd.min.js";
+ $umdSrcFolder = "$pluginDir/vue/src";
+
+ // in case there are dist files but no src files, which can happen during development
+ if (is_dir(PIWIK_INCLUDE_PATH . '/' . $umdSrcFolder)) {
+ if (Development::isEnabled() && is_file(PIWIK_INCLUDE_PATH . '/' . $devUmd)) {
+ return $devUmd;
+ } else if (is_file(PIWIK_INCLUDE_PATH . '/' . $minifiedUmd)) {
+ return $minifiedUmd;
}
}
+
+ return null;
}
public static function orderPluginsByPluginDependencies($plugins, $keepUnresolved = true)