MDL-57690 yui: remove the mcore rollup
authorDan Poltawski <dan@moodle.com>
Wed, 18 Jan 2017 12:38:22 +0000 (12:38 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 19 Jan 2017 08:10:34 +0000 (08:10 +0000)
This was is pre-loading some modules which are not used in boost:

* Block docking
* Popup Help

The other pre-loaded requirements were used for YUI dialogues and
modals. With time we are moving away from these, so rather than
'pre-loading' we can let the yui loader do its job.

lib/outputrequirementslib.php
theme/yui_combo.php

index ed868fa..c829ea2 100644 (file)
@@ -1403,7 +1403,6 @@ class page_requirements_manager {
 
         $baserollups = array(
             'rollup/' . $rollupversion . "/yui-moodlesimple{$yuiformat}.js",
-            'rollup/' . $jsrev . "/mcore{$format}.js",
         );
 
         if ($this->yui3loader->combine) {
index 9e4e536..c834a4b 100644 (file)
@@ -208,30 +208,6 @@ while (count($parts)) {
             }
         }
 
-        // Handle the mcore rollup.
-        if (strpos($rollupname, 'mcore') !== false) {
-            $yuimodules = array(
-                'core/tooltip/tooltip',
-                'core/popuphelp/popuphelp',
-                'core/widget-focusafterclose/widget-focusafterclose',
-                'core/dock/dock-loader',
-                'core/notification/notification-dialogue',
-            );
-
-            // Determine which version of this rollup should be used.
-            $filesuffix = '.js';
-            preg_match('/(-(debug|min))?\.js/', $rollupname, $matches);
-            if (isset($matches[1])) {
-                $filesuffix = $matches[0];
-            }
-
-            // We need to add these new parts to the beginning of the $parts list, not the end.
-            $newparts = array();
-            foreach ($yuimodules as $module) {
-                $newparts[] = 'm/' . $revision . '/' . $module . $filesuffix;
-            }
-            $parts = array_merge($newparts, $parts);
-        }
         continue;
     }
     if ($version === 'm') {