Skip to content

Commit

Permalink
MDL-31242 Prevent redefinition of MOODLE_INTERNAL when loading multip…
Browse files Browse the repository at this point in the history
…le YUI modules from Moodle
  • Loading branch information
Andrew Robert Nicols authored and stronk7 committed Jan 18, 2012
1 parent 4e7397d commit c1e6056
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions theme/yui_combo.php
Expand Up @@ -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
Expand Down

0 comments on commit c1e6056

Please sign in to comment.