summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-25 13:18:55 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-26 13:46:29 +0200
commitde168b38e92aa8de18c36679e6c8bce7f9cef857 (patch)
treeac49cf1f34d7aaf0cec256b8917f76c15edadaed /lib/private/Template
parentfcc5f1ef3d5903e326823c5e623ef9928c3c6030 (diff)
downloadnextcloud-server-de168b38e92aa8de18c36679e6c8bce7f9cef857.tar.gz
nextcloud-server-de168b38e92aa8de18c36679e6c8bce7f9cef857.zip
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>
Diffstat (limited to 'lib/private/Template')
-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..9e76655aba2 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, $theme_dir . "dist/core-$scriptName.js")
+ || $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")))
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
) {
return;