From 7483bdd9088a0b28874bf0bc59c8d81442a8cc2a Mon Sep 17 00:00:00 2001 From: Daniel Poggenpohl Date: Thu, 16 Mar 2023 13:31:34 +0100 Subject: [PATCH 1/3] MDL-77657 theme: Fix get_extra_scss_code load order This led to problems with grandchild themes, depending on their direct parent's extrascsscallback. --- lib/outputlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index 1d2bd55d245..e7f6dbd1b09 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1598,7 +1598,7 @@ class theme_config { // Getting all the candidate functions. $candidates = array(); - foreach ($this->parent_configs as $parent_config) { + foreach (array_reverse($this->parent_configs) as $parent_config) { if (!isset($parent_config->extrascsscallback)) { continue; } From 02716c8ea6dbd2215c3799bfbf8c9c6a700051cb Mon Sep 17 00:00:00 2001 From: Daniel Poggenpohl Date: Mon, 20 Mar 2023 08:50:41 +0100 Subject: [PATCH 2/3] MDL-77657 theme: Fix get_pre_scss_code load order This led to problems with grandchild themes, depending on their direct parent's prescsscallback. --- lib/outputlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index e7f6dbd1b09..d8a6baab94e 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -1631,7 +1631,7 @@ class theme_config { // Getting all the candidate functions. $candidates = array(); - foreach ($this->parent_configs as $parent_config) { + foreach (array_reverse($this->parent_configs) as $parent_config) { if (!isset($parent_config->prescsscallback)) { continue; } From 1f2f32824d2ce0a1ecc0eb3b11b4657590ce5362 Mon Sep 17 00:00:00 2001 From: Daniel Poggenpohl Date: Tue, 4 Apr 2023 15:50:18 +0200 Subject: [PATCH 3/3] MDL-77657 theme: Corrected return type --- theme/boost/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/boost/lib.php b/theme/boost/lib.php index 7e98100f6d8..6cc398d535e 100644 --- a/theme/boost/lib.php +++ b/theme/boost/lib.php @@ -135,7 +135,7 @@ function theme_boost_get_precompiled_css() { * Get SCSS to prepend. * * @param theme_config $theme The theme config object. - * @return array + * @return string */ function theme_boost_get_pre_scss($theme) { global $CFG;