1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/12586] Use dot filter when trying to find available extensions

PHPBB3-12586
This commit is contained in:
Joas Schilling
2014-05-22 23:42:49 +02:00
parent a2cd9c2464
commit 488904d0bf

View File

@@ -409,8 +409,12 @@ class manager
}
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS),
\RecursiveIteratorIterator::SELF_FIRST);
new \phpbb\recursive_dot_prefix_filter_iterator(
new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS)
),
\RecursiveIteratorIterator::SELF_FIRST
);
foreach ($iterator as $file_info)
{
if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)