From d8f45eabcfa86b641c79c8ccbf38e3974f7e2cb5 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Tue, 6 Jun 2023 16:26:19 +0200
Subject: fix import dirs (thx @davka), re #2381

---
 lib/classes/assets/LESSCompiler.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/classes/assets/LESSCompiler.php b/lib/classes/assets/LESSCompiler.php
index 2302e1e..ce05ee4 100644
--- a/lib/classes/assets/LESSCompiler.php
+++ b/lib/classes/assets/LESSCompiler.php
@@ -2,7 +2,6 @@
 namespace Assets;
 
 use Assets;
-use Less_Autoloader;
 use StudipCacheFactory;
 
 /**
@@ -37,7 +36,6 @@ class LESSCompiler implements Compiler
      */
     private function __construct()
     {
-        Less_Autoloader::register();
     }
 
     /**
@@ -60,7 +58,7 @@ class LESSCompiler implements Compiler
             'compress' => \Studip\ENV === 'production',
             'sourceMap' => \Studip\ENV !== 'production',
         ]);
-        $parser->SetImportDirs(["{$GLOBALS['STUDIP_BASE_PATH']}/resources/"]);
+        $parser->SetImportDirs(["{$GLOBALS['STUDIP_BASE_PATH']}/resources/" => '']);
         $parser->ModifyVars($variables);
         $parser->parse($less);
         return $parser->getCSS();
-- 
cgit v1.0

