Ticket #217: 01213_file_exists_fails.diff

File 01213_file_exists_fails.diff, 1.4 kB (added by rho, 9 months ago)
  • lib/sanitychecks.php

    old new  
    1010        $diemessages[] = 'Configuration problem: The <code>$CFG->dirroot</code> setting in config.php is empty.'; 
    1111    } elseif (substr($CFG->dirroot, -1) != "/") { 
    1212        $diemessages[] = 'Configuration problem: The <code>$CFG->dirroot</code> setting in config.php must end with a forward slash (/).'; 
    13     } elseif (!file_exists($CFG->dirroot)) { 
     13    } elseif (!is_readable($CFG->dirroot)) { 
    1414        //this needs checking now, because includes.php needs it to work 
    15         $diemessages[] = 'Configuration problem: The <code>$CFG->dirroot</code> setting in config.php points to a directory that does not exist.'; 
    16     } elseif (!is_dir($CFG->dirroot)) { 
    17         $diemessages[] = 'Configuration problem: The <code>$CFG->dirroot</code> setting in config.php points to a location that is not a directory.'; 
    18     } 
    19      
     15        $diemessages[] = 'Configuration problem: The <code>$CFG->dirroot</code> setting in config.php points to a directory that can not be read.'; 
     16    }     
     17 
    2018    if (!preg_match('#^https?://.+#', $CFG->wwwroot)) { 
    2119        $diemessages[] = 'Configuration problem: The <code>$CFG->wwwroot</code> setting in config.php is empty or not a valid URL.'; 
    2220    } elseif (substr($CFG->wwwroot, -1) != "/") {