]> 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)
committerCarl Schwan <carl@carlschwan.eu>
Fri, 26 Aug 2022 11:46:29 +0000 (13:46 +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..9e76655aba21b5f8956a28fffb2eeb7f4983e520 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, $theme_dir . "dist/core-$scriptName.js")
+                               || $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")))
                        || $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
                ) {
                        return;