From 104d698ffdadf6eb4e1d11743d66ceb19790d3dd Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 28 Nov 2013 11:49:12 +0800 Subject: [PATCH] MDL-43105 JavaScript: Use the correct versions of our rollups --- lib/outputrequirementslib.php | 17 +++++++++++++---- theme/yui_combo.php | 11 +++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index 462a3b0b647..d530d797e2d 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -1249,14 +1249,25 @@ class page_requirements_manager { $code = ''; $jsrev = $this->get_jsrev(); + + $yuiformat = '-min'; + if ($this->yui3loader->filter === 'RAW') { + $yuiformat = ''; + } + + $format = '-min'; + if ($this->YUI_config->groups['moodle']['filter'] === 'DEBUG') { + $format = '-debug'; + } + $baserollups = array( - 'rollup/' . $CFG->yui3version . '/yui-moodlesimple-min.js', + 'rollup/' . $CFG->yui3version . '/yui-moodlesimple' . $yuiformat . '.js', ); // The reason for separate rollups is that the Y = YUI().use('*') call is run async and // it gets it's knickers in a twist. Putting it in a separate