mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-40563 improve yui serving performance
It is not necessary to do full page init to access the plugin locations API.
This commit is contained in:
parent
23ee749bfb
commit
cba94cec14
2 changed files with 2 additions and 14 deletions
|
@ -87,12 +87,6 @@ foreach ($parts as $part) {
|
||||||
$content .= "\n// Incorrect moodle module inclusion. Not enough component information in {$part}.\n";
|
$content .= "\n// Incorrect moodle module inclusion. Not enough component information in {$part}.\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!defined('ABORT_AFTER_CONFIG_CANCEL')) {
|
|
||||||
define('ABORT_AFTER_CONFIG_CANCEL', true);
|
|
||||||
define('NO_UPGRADE_CHECK', true);
|
|
||||||
define('NO_MOODLE_COOKIES', true);
|
|
||||||
require($CFG->libdir.'/setup.php');
|
|
||||||
}
|
|
||||||
$revision = (int)array_shift($bits);
|
$revision = (int)array_shift($bits);
|
||||||
if ($revision === -1) {
|
if ($revision === -1) {
|
||||||
// Revision -1 says please don't cache the JS
|
// Revision -1 says please don't cache the JS
|
||||||
|
@ -101,7 +95,7 @@ foreach ($parts as $part) {
|
||||||
$frankenstyle = array_shift($bits);
|
$frankenstyle = array_shift($bits);
|
||||||
$filename = array_pop($bits);
|
$filename = array_pop($bits);
|
||||||
$modulename = $bits[0];
|
$modulename = $bits[0];
|
||||||
$dir = get_component_directory($frankenstyle);
|
$dir = core_component::get_component_directory($frankenstyle);
|
||||||
|
|
||||||
// For shifted YUI modules, we need the YUI module name in frankenstyle format.
|
// For shifted YUI modules, we need the YUI module name in frankenstyle format.
|
||||||
$frankenstylemodulename = join('-', array($version, $frankenstyle, $modulename));
|
$frankenstylemodulename = join('-', array($version, $frankenstyle, $modulename));
|
||||||
|
|
|
@ -41,17 +41,11 @@ $etag = sha1($path);
|
||||||
$parts = explode('/', $path);
|
$parts = explode('/', $path);
|
||||||
$version = array_shift($parts);
|
$version = array_shift($parts);
|
||||||
if ($version == 'moodle' && count($parts) >= 3) {
|
if ($version == 'moodle' && count($parts) >= 3) {
|
||||||
if (!defined('ABORT_AFTER_CONFIG_CANCEL')) {
|
|
||||||
define('ABORT_AFTER_CONFIG_CANCEL', true);
|
|
||||||
define('NO_UPGRADE_CHECK', true);
|
|
||||||
define('NO_MOODLE_COOKIES', true);
|
|
||||||
require($CFG->libdir.'/setup.php');
|
|
||||||
}
|
|
||||||
$frankenstyle = array_shift($parts);
|
$frankenstyle = array_shift($parts);
|
||||||
$module = array_shift($parts);
|
$module = array_shift($parts);
|
||||||
$image = array_pop($parts);
|
$image = array_pop($parts);
|
||||||
$subdir = join('/', $parts);
|
$subdir = join('/', $parts);
|
||||||
$dir = get_component_directory($frankenstyle);
|
$dir = core_component::get_component_directory($frankenstyle);
|
||||||
|
|
||||||
// For shifted YUI modules, we need the YUI module name in frankenstyle format.
|
// For shifted YUI modules, we need the YUI module name in frankenstyle format.
|
||||||
$frankenstylemodulename = join('-', array($version, $frankenstyle, $module));
|
$frankenstylemodulename = join('-', array($version, $frankenstyle, $module));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue