mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-37598-abort-after-config' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
6033723098
@ -82,10 +82,11 @@ foreach ($parts as $part) {
|
||||
//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) {
|
||||
|
@ -43,9 +43,12 @@ $parts = explode('/', $path);
|
||||
$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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user