Browse files

MDL-31242 Prevent redefinition of MOODLE_INTERNAL when loading multip…

…le YUI modules from Moodle
  • Loading branch information...
1 parent e7a8905 commit e639d0cca81b99669d5958fd8c8e08a14b41cea0 @andrewnicols andrewnicols committed with stronk7 Jan 18, 2012
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 e639d0c

Please sign in to comment.