Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-25 14:18:55 +0300
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-08-26 20:49:00 +0300
commit329687ecff245b9b2f462a6fccf45a996297a41f (patch)
treeadf6e3e9b3052918da4092491412ceb3255eaa9d
parentfa466a093cef75abaf0696421f4a9b640122242c (diff)
Make it possible to load theme/<themename>/dist
This fix a regression with the theming api following the change in webpack bundling introduced in 24 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
-rw-r--r--lib/private/Template/JSResourceLocator.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php
index 95ae0d3d832..f672102c0e8 100644
--- a/lib/private/Template/JSResourceLocator.php
+++ b/lib/private/Template/JSResourceLocator.php
@@ -71,12 +71,14 @@ class JSResourceLocator extends ResourceLocator {
} elseif ($this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js')
|| $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')
|| $this->appendIfExist($this->serverroot, $script.'.js')
+ || $this->appendIfExist($this->serverroot, "$theme_dir.'dist/$app-$scriptName.js")
|| $this->appendIfExist($this->serverroot, "dist/$app-$scriptName.js")
|| $this->appendIfExist($this->serverroot, 'apps/'.$script.'.js')
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
|| $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js')
|| $this->appendIfExist($this->serverroot, 'core/'.$script.'.js')
- || (strpos($scriptName, '/') === -1 && $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js"))
+ || (strpos($scriptName, '/') === -1 && ($this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")
+ || $this->appendIfExist($this->serverroot, $theme_dir . "dist/core-$scriptName.js")))
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
) {
return;