Merge branch 'MDL-67689-master' of git://github.com/bmbrands/moodle

This commit is contained in:
Andrew Nicols
2020-05-15 10:36:54 +08:00
+11 -2
View File
@@ -1208,6 +1208,7 @@ class theme_config {
*/
public function get_css_content_debug($type, $subtype, $sheet) {
if ($type === 'scss') {
// The SCSS file of the theme is requested.
$csscontent = $this->get_css_content_from_scss(true);
@@ -1430,9 +1431,17 @@ class theme_config {
// TODO: MDL-62757 When changing anything in this method please do not forget to check
// if the validate() method in class admin_setting_configthemepreset needs updating too.
$cacheoptions = '';
if ($themedesigner) {
$scsscachedir = $CFG->localcachedir . '/scsscache/';
$cacheoptions = array(
'cacheDir' => $scsscachedir,
'prefix' => 'scssphp_',
'forceRefresh' => false,
);
}
// Set-up the compiler.
$compiler = new core_scss();
$compiler = new core_scss($cacheoptions);
$compiler->prepend_raw_scss($this->get_pre_scss_code());
if (is_string($scss)) {
$compiler->set_file($scss);