mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-20 14:29:48 +02:00
Merge pull request #2491 from nickvergessen/ticket/12586
Ticket/12586 Filter files and depth when looking for extensions * nickvergessen/ticket/12586: [ticket/12586] Limit depth to 2, we require vendor/extension/ext.php [ticket/12586] Use dot filter when trying to find available extensions
This commit is contained in:
commit
b0dd144fe3
@ -409,8 +409,13 @@ 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
|
||||
);
|
||||
$iterator->setMaxDepth(2);
|
||||
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)
|
||||
|
Loading…
x
Reference in New Issue
Block a user