Browse files

MDL-16556 Applied Mark Nielsen's patch

  • Loading branch information...
1 parent 65dc989 commit cc980ff6e5c2f17a5fe1aa2feba6ae1b7d5ba23b nicolasconnault committed Sep 19, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moodlelib.php
View
4 lib/moodlelib.php
@@ -7021,11 +7021,11 @@ function check_dir_exists($dir, $create=false, $recursive=false) {
} else {
umask(0000);
if ($recursive) {
- /// PHP 5.0 has recursive mkdir parameter, but 4.x does not :-(
- $dir = str_replace('\\', '/', $dir); //windows compatibility
/// We are going to make it recursive under $CFG->dataroot only
/// (will help sites running open_basedir security and others)
$dir = str_replace($CFG->dataroot . '/', '', $dir);
+ /// PHP 5.0 has recursive mkdir parameter, but 4.x does not :-(
+ $dir = str_replace('\\', '/', $dir); //windows compatibility
$dirs = explode('/', $dir); /// Extract path parts
/// Iterate over each part with start point $CFG->dataroot
$dir = $CFG->dataroot . '/';

0 comments on commit cc980ff

Please sign in to comment.