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
|
@ -41,17 +41,11 @@ $etag = sha1($path);
|
|||
$parts = explode('/', $path);
|
||||
$version = array_shift($parts);
|
||||
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);
|
||||
$module = array_shift($parts);
|
||||
$image = array_pop($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.
|
||||
$frankenstylemodulename = join('-', array($version, $frankenstyle, $module));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue