diff options
author | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
---|---|---|
committer | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
commit | e917f9be8b05c81357c1c2c9730d5060685d644d (patch) | |
tree | b6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /system/helpers/directory_helper.php | |
parent | 5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff) | |
parent | e1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff) |
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'system/helpers/directory_helper.php')
-rw-r--r-- | system/helpers/directory_helper.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index 7de6a3c51..574a5d8b0 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -38,7 +38,7 @@ * @param string path to source * @param int depth of directories to traverse (0 = fully recursive, 1 = current dir, etc) * @return array - */ + */ if ( ! function_exists('directory_map')) { function directory_map($source_dir, $directory_depth = 0, $hidden = FALSE) @@ -47,8 +47,8 @@ if ( ! function_exists('directory_map')) { $filedata = array(); $new_depth = $directory_depth - 1; - $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; - + $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; + while (FALSE !== ($file = readdir($fp))) { // Remove '.', '..', and hidden files [optional] @@ -66,7 +66,7 @@ if ( ! function_exists('directory_map')) $filedata[] = $file; } } - + closedir($fp); return $filedata; } |