From 91099e368bfc7196f7653c8f7d84a891b8a55758 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 23 Feb 2005 15:40:53 +0000 Subject: [PATCH] Added checks for allow_fopen_url in two more places! --- admin/config.php | 14 ++++++++------ install.php | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/admin/config.php b/admin/config.php index 667c486ea54..032f00c8f65 100644 --- a/admin/config.php +++ b/admin/config.php @@ -150,12 +150,14 @@ $httpsurl = str_replace('http://', 'https://', $CFG->wwwroot); if ($httpsurl != $CFG->wwwroot) { - if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) { - echo ''."\n"; + if (ini_get('allow_url_fopen')) { + if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) { + echo ''."\n"; + } } } diff --git a/install.php b/install.php index bcde35d7e89..08a8324f1c3 100644 --- a/install.php +++ b/install.php @@ -262,7 +262,9 @@ if ($INSTALL['stage'] == 3) { /// If we can open a file then we know that the admin name is correct. 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; fclose($fh); } else {