]> git.mjollnir.org Git - moodle.git/commitdiff
Make sure .htaccess is created in dataroot, just in case
authormoodler <moodler>
Fri, 18 Aug 2006 09:54:09 +0000 (09:54 +0000)
committermoodler <moodler>
Fri, 18 Aug 2006 09:54:09 +0000 (09:54 +0000)
lib/setuplib.php

index f0bfc1d56acf4db66a2022c736f33c4c57e28f9f..63ddebb48a6ffb88df2347280b8d7fc5bc893788 100644 (file)
@@ -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);