Skip to content
Permalink
Browse files

Added checks for allow_fopen_url in two more places!

  • Loading branch information...
moodler
moodler committed Feb 23, 2005
1 parent e76ae26 commit 91099e368bfc7196f7653c8f7d84a891b8a55758
Showing with 11 additions and 7 deletions.
  1. +8 −6 admin/config.php
  2. +3 −1 install.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 '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo "eval('document.form.loginhttps.disabled=true');\n";
echo '-->'."\n";
echo '</script>'."\n";
if (ini_get('allow_url_fopen')) {
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
echo '<script type="text/javascript">'."\n";
echo '<!--'."\n";
echo "eval('document.form.loginhttps.disabled=true');\n";
echo '-->'."\n";
echo '</script>'."\n";
}
}
}
@@ -262,7 +262,9 @@
/// 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 {

0 comments on commit 91099e3

Please sign in to comment.
You can’t perform that action at this time.