Skip to content
Browse files

MDL-31242 Prevent redefinition of MOODLE_INTERNAL when loading multip…

…le YUI modules from Moodle
  • Loading branch information...
1 parent fe0bc2e commit 73c932022fb3b812bf8ec25be8b07d8b4d442ca2 @andrewnicols andrewnicols committed with kordan
Showing with 4 additions and 2 deletions.
  1. +4 −2 theme/yui_combo.php
View
6 theme/yui_combo.php
@@ -74,8 +74,10 @@
$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

0 comments on commit 73c9320

Please sign in to comment.
Something went wrong with that request. Please try again.