From: moodler Date: Fri, 18 Aug 2006 09:54:09 +0000 (+0000) Subject: Make sure .htaccess is created in dataroot, just in case X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d100b8a04dccd43ddaac4e2c55b20eaa42efac60;p=moodle.git Make sure .htaccess is created in dataroot, just in case --- diff --git a/lib/setuplib.php b/lib/setuplib.php index f0bfc1d56a..63ddebb48a 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -55,6 +55,10 @@ function make_upload_directory($directory, $shownotices=true) { } return false; } + } + + // Make sure a .htaccess file is here, JUST IN CASE the files area is in the open + if (!file_exists($currdir.'/.htaccess')) { if ($handle = fopen($currdir.'/.htaccess', 'w')) { // For safety @fwrite($handle, "deny from all\r\n"); @fclose($handle);