MDL-15249 $_SERVER['HTTP_HOST'] not availabel in CLI script, replaced by parsing of wwwroot which should give the same info
This commit is contained in:
+2
-2
@@ -51,7 +51,7 @@ function xmldb_main_install() {
|
||||
'template' => 'default',
|
||||
'theme' => 'standardwhite',
|
||||
'filter_multilang_converted' => 1,
|
||||
'siteidentifier' => random_string(32).$_SERVER['HTTP_HOST'],
|
||||
'siteidentifier' => random_string(32).get_host_from_url($CFG->wwwroot),
|
||||
'backup_version' => 2008111700,
|
||||
'backup_release' => '2.0 dev',
|
||||
'blocks_version' => 2007081300, // might be removed soon
|
||||
@@ -158,7 +158,7 @@ function xmldb_main_install() {
|
||||
$admin->lang = $CFG->lang;
|
||||
$admin->maildisplay = 1;
|
||||
$admin->timemodified = time();
|
||||
$admin->lastip = getremoteaddr(); // installation hijacking prevention
|
||||
$admin->lastip = CLI_SCRIPT ? '0.0.0.0' : getremoteaddr(); // installation hijacking prevention
|
||||
$admin->id = $DB->insert_record('user', $admin);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user