mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-31501 session: fixed missing autoloader during install
This commit is contained in:
parent
d99847a338
commit
98d696b6d5
2 changed files with 16 additions and 0 deletions
|
@ -189,6 +189,14 @@ require_once($CFG->libdir.'/adminlib.php');
|
||||||
require_once($CFG->libdir.'/componentlib.class.php');
|
require_once($CFG->libdir.'/componentlib.class.php');
|
||||||
require_once($CFG->dirroot.'/cache/lib.php');
|
require_once($CFG->dirroot.'/cache/lib.php');
|
||||||
|
|
||||||
|
// Register our classloader, in theory somebody might want to replace it to load other hacked core classes.
|
||||||
|
// Required because the database checks below lead to session interaction which is going to lead us to requiring autoloaded classes.
|
||||||
|
if (defined('COMPONENT_CLASSLOADER')) {
|
||||||
|
spl_autoload_register(COMPONENT_CLASSLOADER);
|
||||||
|
} else {
|
||||||
|
spl_autoload_register('core_component::classloader');
|
||||||
|
}
|
||||||
|
|
||||||
require($CFG->dirroot.'/version.php');
|
require($CFG->dirroot.'/version.php');
|
||||||
$CFG->target_release = $release;
|
$CFG->target_release = $release;
|
||||||
|
|
||||||
|
|
|
@ -221,6 +221,14 @@ ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include
|
||||||
//point zend include path to moodles lib/zend so that includes and requires will search there for files before anywhere else
|
//point zend include path to moodles lib/zend so that includes and requires will search there for files before anywhere else
|
||||||
ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include_path'));
|
ini_set('include_path', $CFG->libdir.'/zend' . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
|
|
||||||
|
// Register our classloader, in theory somebody might want to replace it to load other hacked core classes.
|
||||||
|
// Required because the database checks below lead to session interaction which is going to lead us to requiring autoloaded classes.
|
||||||
|
if (defined('COMPONENT_CLASSLOADER')) {
|
||||||
|
spl_autoload_register(COMPONENT_CLASSLOADER);
|
||||||
|
} else {
|
||||||
|
spl_autoload_register('core_component::classloader');
|
||||||
|
}
|
||||||
|
|
||||||
require('version.php');
|
require('version.php');
|
||||||
$CFG->target_release = $release;
|
$CFG->target_release = $release;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue