Skip to content

Commit

Permalink
Merge branch 'MDL-37598-abort-after-config' of git://github.com/mudrd…
Browse files Browse the repository at this point in the history
…8mz/moodle
  • Loading branch information
stronk7 committed Feb 12, 2013
2 parents fe4a6d3 + 5583447 commit 6033723
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions theme/yui_combo.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@
//debug($bits);
$version = array_shift($bits);
if ($version === 'moodle') {
//TODO: this is a ugly hack because we should not load any libs here!
if (!defined('MOODLE_INTERNAL')) {
define('MOODLE_INTERNAL', true);
require_once($CFG->libdir.'/moodlelib.php');
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');
}
$revision = (int)array_shift($bits);
if ($revision === -1) {
Expand Down
9 changes: 6 additions & 3 deletions theme/yui_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@
$version = array_shift($parts);

if ($version == 'moodle' && count($parts) >= 3) {
//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('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);
Expand Down

0 comments on commit 6033723

Please sign in to comment.