1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[ticket/16955] Use common code for path iterator generation

PHPBB3-16955
This commit is contained in:
Marc Alexander
2022-12-26 13:51:45 +01:00
parent 8faabb559d
commit 9a546c535c
10 changed files with 64 additions and 41 deletions

View File

@@ -646,14 +646,10 @@ function phpbb_email_hash($email)
*/
function phpbb_load_extensions_autoloaders($phpbb_root_path)
{
$iterator = new \RecursiveIteratorIterator(
new \phpbb\recursive_dot_prefix_filter_iterator(
new \RecursiveDirectoryIterator(
$phpbb_root_path . 'ext/',
\FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS
)
),
\RecursiveIteratorIterator::SELF_FIRST
$iterator = new \phpbb\iterator\recursive_path_iterator(
$phpbb_root_path . 'ext/',
\RecursiveIteratorIterator::SELF_FIRST,
\FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS
);
$iterator->setMaxDepth(2);