]> git.mjollnir.org Git - moodle.git/commitdiff
Little modification to use $CFG->directorypermissions in mkdir
authorstronk7 <stronk7>
Wed, 16 Jul 2003 07:57:10 +0000 (07:57 +0000)
committerstronk7 <stronk7>
Wed, 16 Jul 2003 07:57:10 +0000 (07:57 +0000)
backup/lib.php

index c08ffc1a472ded6906f1c354d0c9826df5487f38..fcff668887eb63a9d8d150b9e97545927d0248c0 100644 (file)
     }
 
     function backup_copy_dir($from_file,$to_file) {
+
+        global $CFG;
+
         if (!is_dir($to_file)) {
-            mkdir($to_file);
-            chmod("$to_file",0777);
+            mkdir($to_file,$CFG->directorypermissions);
         }
         $dir = opendir($from_file);
         while ($file=readdir($dir)) {