New and upgraded sites will be given a default .htaccess file in their
dataroot directory SC#64
This commit is contained in:
@@ -868,6 +868,16 @@ function main_upgrade($oldversion=0) {
|
||||
");
|
||||
}
|
||||
|
||||
if ($oldversion < 2005011000) { // Create a .htaccess file in dataroot, just in case
|
||||
if (!file_exists($CFG->dataroot.'/.htaccess')) {
|
||||
if ($handle = fopen($CFG->dataroot.'/.htaccess', 'w')) { // For safety
|
||||
@fwrite($handle, "deny from all\r\n");
|
||||
@fclose($handle);
|
||||
notify("Created a default .htaccess file in $CFG->dataroot");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user