diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-08-25 13:18:55 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-08-26 19:49:00 +0200 |
commit | 329687ecff245b9b2f462a6fccf45a996297a41f (patch) | |
tree | adf6e3e9b3052918da4092491412ceb3255eaa9d /lib | |
parent | fa466a093cef75abaf0696421f4a9b640122242c (diff) | |
download | nextcloud-server-329687ecff245b9b2f462a6fccf45a996297a41f.tar.gz nextcloud-server-329687ecff245b9b2f462a6fccf45a996297a41f.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')
-rw-r--r-- | lib/private/Template/JSResourceLocator.php | 4 |
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; |