diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-03-13 23:34:42 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-03-14 00:32:35 +0100 |
commit | 329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea (patch) | |
tree | 0d586fd6b6191cdbba79f827b6d2adc843fdca14 /phpBB/phpbb/extension | |
parent | a3b95839f5cda01a6a24715489f0f02a4267f014 (diff) | |
download | forums-329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea.tar forums-329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea.tar.gz forums-329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea.tar.bz2 forums-329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea.tar.xz forums-329eb7c2b1d72a6502e6c0daa78bd9e30254f4ea.zip |
[ticket/12268] Use FilesystemIterator::SKIP_DOTS
PHPBB3-12268
Diffstat (limited to 'phpBB/phpbb/extension')
-rw-r--r-- | phpBB/phpbb/extension/finder.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/phpBB/phpbb/extension/finder.php b/phpBB/phpbb/extension/finder.php index fd19436c16..4fb46c6ffd 100644 --- a/phpBB/phpbb/extension/finder.php +++ b/phpBB/phpbb/extension/finder.php @@ -475,15 +475,19 @@ class finder } $directory_pattern = '#' . $directory_pattern . '#'; - $iterator = new \phpbb\extension\recursive_filter_iterator(new \RecursiveDirectoryIterator($path)); - $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); + $iterator = new \RecursiveIteratorIterator( + new \phpbb\extension\recursive_filter_iterator( + new \RecursiveDirectoryIterator( + $path, + \FilesystemIterator::SKIP_DOTS + ) + ), + \RecursiveIteratorIterator::SELF_FIRST + ); + foreach ($iterator as $file_info) { $filename = $file_info->getFilename(); - if ($filename == '.' || $filename == '..') - { - continue; - } if ($file_info->isDir() == $is_dir) { |