From 54d076a353d2570c466116b6cfbcbd34c9ab55f3 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 27 Nov 2013 09:46:58 +0800 Subject: [PATCH] MDL-43104 JavaScript: Combine mcore JS into simplemoodle I was wrong about why this didn't work before - this was caused by the missing semi-colon. Joining these scripts into a single combo-load has the benefit of further reducing the number of HTTP transactions to load a page, and a minor reduction on transferred size due to a reduced header count. --- lib/outputrequirementslib.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index d530d797e2d..e0648ffad8a 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -1261,13 +1261,8 @@ class page_requirements_manager { } $baserollups = array( - '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 '; - $code .= ''; } else { if (!empty($page->theme->yuicssmodules)) { @@ -1290,13 +1283,10 @@ class page_requirements_manager { $code .= ''; } } - $code .= ''; + $code .= ''; foreach ($baserollups as $rollup) { $code .= ''; } - foreach ($moodlerollups as $rollup) { - $code .= ''; - } } if ($this->yui3loader->filter === 'RAW') { -- 2.43.0