]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make it possible to load theme/<themename>/dist
authorCarl Schwan <carl@carlschwan.eu>
Thu, 25 Aug 2022 11:18:55 +0000 (13:18 +0200)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Fri, 26 Aug 2022 17:49:00 +0000 (19:49 +0200)
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>
lib/private/Template/JSResourceLocator.php

index 95ae0d3d83221fda85014ba81e41e371bb9f28a0..f672102c0e86f2d0815e3c1df6c503fd267fd5ab 100644 (file)
@@ -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;