]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the correct root to determinate the webroot for the resource 22550/head
authorJoas Schilling <coding@schilljs.com>
Wed, 2 Sep 2020 15:13:24 +0000 (17:13 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 2 Sep 2020 15:13:24 +0000 (17:13 +0200)
Since all the compiled routes are based on the server webroot,
we have to use this, independent from which app this belongs to.

Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Template/CSSResourceLocator.php

index 750d33fd7261bccc71ec5699c0de1cabc8331bb8..b5c16d1690b3f7ecc4ab73ed24576453b21a6849 100644 (file)
@@ -109,7 +109,7 @@ class CSSResourceLocator extends ResourceLocator {
                if (is_file($root.'/'.$file)) {
                        if ($this->scssCacher !== null) {
                                if ($this->scssCacher->process($root, $file, $app)) {
-                                       $this->append($root, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true);
+                                       $this->append($this->serverroot, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true);
                                        return true;
                                } else {
                                        $this->logger->warning('Failed to compile and/or save '.$root.'/'.$file, ['app' => 'core']);
@@ -145,7 +145,7 @@ class CSSResourceLocator extends ResourceLocator {
                                }
                        }
 
-                       $this->resources[] = [$webRoot: \OC::$WEBROOT, $webRoot, $file];
+                       $this->resources[] = [$webRoot ?: \OC::$WEBROOT, $webRoot, $file];
                }
        }
 }