mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 20:36:42 +01:00
MDL-31242 Prevent redefinition of MOODLE_INTERNAL when loading multiple YUI modules from Moodle
This commit is contained in:
parent
fe0bc2e0be
commit
73c932022f
@ -74,8 +74,10 @@ foreach ($parts as $part) {
|
||||
$version = array_shift($bits);
|
||||
if ($version == 'moodle') {
|
||||
//TODO: this is a ugly hack because we should not load any libs here!
|
||||
define('MOODLE_INTERNAL', true);
|
||||
require_once($CFG->libdir.'/moodlelib.php');
|
||||
if (!defined('MOODLE_INTERNAL')) {
|
||||
define('MOODLE_INTERNAL', true);
|
||||
require_once($CFG->libdir.'/moodlelib.php');
|
||||
}
|
||||
$revision = (int)array_shift($bits);
|
||||
if ($revision === -1) {
|
||||
// Revision -1 says please don't cache the JS
|
||||
|
Loading…
x
Reference in New Issue
Block a user