mirror of
https://github.com/moodle/moodle.git
synced 2025-04-06 00:42:44 +02:00
Merge branch 'int_install' of https://github.com/skodak/moodle
This commit is contained in:
commit
fe64d4f7c8
@ -151,6 +151,7 @@ if (version_compare(phpversion(), "5.3.3") < 0) {
|
||||
}
|
||||
|
||||
// set up configuration
|
||||
global $CFG;
|
||||
$CFG = new stdClass();
|
||||
$CFG->lang = 'en';
|
||||
$CFG->dirroot = dirname(dirname(dirname(__FILE__)));
|
||||
@ -200,6 +201,26 @@ if (defined('COMPONENT_CLASSLOADER')) {
|
||||
require($CFG->dirroot.'/version.php');
|
||||
$CFG->target_release = $release;
|
||||
|
||||
$_SESSION = array();
|
||||
$_SESSION['SESSION'] = new stdClass();
|
||||
$_SESSION['SESSION']->lang = $CFG->lang;
|
||||
$_SESSION['USER'] = new stdClass();
|
||||
$_SESSION['USER']->id = 0;
|
||||
$_SESSION['USER']->mnethostid = 1;
|
||||
|
||||
global $SESSION;
|
||||
global $USER;
|
||||
$SESSION = &$_SESSION['SESSION'];
|
||||
$USER = &$_SESSION['USER'];
|
||||
|
||||
global $COURSE;
|
||||
$COURSE = new stdClass();
|
||||
$COURSE->id = 1;
|
||||
|
||||
global $SITE;
|
||||
$SITE = $COURSE;
|
||||
define('SITEID', 1);
|
||||
|
||||
//Database types
|
||||
$databases = array('mysqli' => moodle_database::get_driver_instance('mysqli', 'native'),
|
||||
'mariadb'=> moodle_database::get_driver_instance('mariadb', 'native'),
|
||||
|
21
install.php
21
install.php
@ -161,6 +161,7 @@ if (!empty($_POST)) {
|
||||
}
|
||||
|
||||
// Fake some settings so that we can use selected functions from moodlelib.php, weblib.php and filelib.php.
|
||||
global $CFG;
|
||||
$CFG = new stdClass();
|
||||
$CFG->lang = $config->lang;
|
||||
$CFG->dirroot = dirname(__FILE__);
|
||||
@ -232,17 +233,25 @@ if (defined('COMPONENT_CLASSLOADER')) {
|
||||
require('version.php');
|
||||
$CFG->target_release = $release;
|
||||
|
||||
$SESSION = new stdClass();
|
||||
$SESSION->lang = $CFG->lang;
|
||||
$_SESSION = array();
|
||||
$_SESSION['SESSION'] = new stdClass();
|
||||
$_SESSION['SESSION']->lang = $CFG->lang;
|
||||
$_SESSION['USER'] = new stdClass();
|
||||
$_SESSION['USER']->id = 0;
|
||||
$_SESSION['USER']->mnethostid = 1;
|
||||
|
||||
$USER = new stdClass();
|
||||
$USER->id = 0;
|
||||
global $SESSION;
|
||||
global $USER;
|
||||
$SESSION = &$_SESSION['SESSION'];
|
||||
$USER = &$_SESSION['USER'];
|
||||
|
||||
global $COURSE;
|
||||
$COURSE = new stdClass();
|
||||
$COURSE->id = 0;
|
||||
$COURSE->id = 1;
|
||||
|
||||
global $SITE;
|
||||
$SITE = $COURSE;
|
||||
define('SITEID', 0);
|
||||
define('SITEID', 1);
|
||||
|
||||
$hint_dataroot = '';
|
||||
$hint_admindir = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user