From 0f722cfbe508128db2dc70021758db7607abb4b6 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Mon, 17 Feb 2014 10:02:10 +0800 Subject: [PATCH] MDL-44214 Javascript: Allow for patching of modules in the simpleyui rollup The moodlesimple (former simpleyui) rollup is included by a slightly different mechanism to the the other YUI modules and this was missed off the original yuipatchlevel implementation. --- lib/outputrequirementslib.php | 7 ++++++- theme/yui_combo.php | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 18aea452179..906b70e4e39 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -1252,8 +1252,13 @@ class page_requirements_manager { $format = '-debug'; } + $rollupversion = $CFG->yui3version; + if (!empty($CFG->yuipatchlevel)) { + $rollupversion .= '_' . $CFG->yuipatchlevel; + } + $baserollups = array( - 'rollup/' . $CFG->yui3version . "/yui-moodlesimple{$yuiformat}.js", + 'rollup/' . $rollupversion . "/yui-moodlesimple{$yuiformat}.js", 'rollup/' . $jsrev . "/mcore{$format}.js", ); diff --git a/theme/yui_combo.php b/theme/yui_combo.php index 83221392363..77f7c7ed199 100644 --- a/theme/yui_combo.php +++ b/theme/yui_combo.php @@ -83,7 +83,8 @@ while (count($parts)) { $version = array_shift($bits); if ($version === 'rollup') { - $revision = array_shift($bits); + $yuipatchedversion = explode('_', array_shift($bits)); + $revision = $yuipatchedversion[0]; $rollupname = array_shift($bits); if (strpos($rollupname, 'yui-moodlesimple') !== false) {