Merge branch 'MDL-50258_master' of git://github.com/dmonllao/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 7 Dec 2015 09:04:35 +0000 (09:04 +0000)
committerDan Poltawski <dan@moodle.com>
Mon, 7 Dec 2015 09:04:35 +0000 (09:04 +0000)
lib/outputlib.php

index e1ada8a..64e0299 100644 (file)
@@ -1078,6 +1078,7 @@ class theme_config {
      * @return bool|string Return false when the compilation failed. Else the compiled string.
      */
     protected function get_css_content_from_less($themedesigner) {
+        global $CFG;
 
         $lessfile = $this->lessfile;
         if (!$lessfile || !is_readable($this->dir . '/less/' . $lessfile . '.less')) {
@@ -1106,7 +1107,8 @@ class theme_config {
         if ($themedesigner) {
             // Add the sourceMap inline to ensure that it is atomically generated.
             $options['sourceMap'] = true;
-            $options['sourceRoot'] = 'theme';
+            $options['sourceMapBasepath'] = $CFG->dirroot;
+            $options['sourceMapRootpath'] = $CFG->wwwroot;
         }
 
         // Instantiate the compiler.