mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 15:49:43 +02:00
Added checks for allow_fopen_url in two more places!
This commit is contained in:
parent
e76ae26489
commit
91099e368b
2 changed files with 11 additions and 7 deletions
|
@ -150,12 +150,14 @@
|
||||||
|
|
||||||
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
|
$httpsurl = str_replace('http://', 'https://', $CFG->wwwroot);
|
||||||
if ($httpsurl != $CFG->wwwroot) {
|
if ($httpsurl != $CFG->wwwroot) {
|
||||||
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
|
if (ini_get('allow_url_fopen')) {
|
||||||
echo '<script type="text/javascript">'."\n";
|
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
|
||||||
echo '<!--'."\n";
|
echo '<script type="text/javascript">'."\n";
|
||||||
echo "eval('document.form.loginhttps.disabled=true');\n";
|
echo '<!--'."\n";
|
||||||
echo '-->'."\n";
|
echo "eval('document.form.loginhttps.disabled=true');\n";
|
||||||
echo '</script>'."\n";
|
echo '-->'."\n";
|
||||||
|
echo '</script>'."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,9 @@ if ($INSTALL['stage'] == 3) {
|
||||||
/// If we can open a file then we know that the admin name is correct.
|
/// If we can open a file then we know that the admin name is correct.
|
||||||
|
|
||||||
if ($nextstage == 4 or $INSTALL['stage'] == 4) {
|
if ($nextstage == 4 or $INSTALL['stage'] == 4) {
|
||||||
if (($fh = @fopen($INSTALL['wwwroot'].'/'.$INSTALL['admindirname'].'/site.html', 'r')) !== false) {
|
if (!ini_get('allow_url_fopen')) {
|
||||||
|
$nextstage = ($goforward) ? 5 : 3;
|
||||||
|
} else if (($fh = @fopen($INSTALL['wwwroot'].'/'.$INSTALL['admindirname'].'/site.html', 'r')) !== false) {
|
||||||
$nextstage = ($goforward) ? 5 : 3;
|
$nextstage = ($goforward) ? 5 : 3;
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue