1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 10:44:20 +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

@@ -220,15 +220,7 @@ class acp_language
{
try
{
$iterator = new \RecursiveIteratorIterator(
new \phpbb\recursive_dot_prefix_filter_iterator(
new \RecursiveDirectoryIterator(
$this->phpbb_root_path . 'language/' . $this->config['default_lang'] . '/',
\FilesystemIterator::SKIP_DOTS
)
),
\RecursiveIteratorIterator::LEAVES_ONLY
);
$iterator = new \phpbb\iterator\recursive_path_iterator($this->phpbb_root_path . 'language/' . $this->config['default_lang'] . '/');
}
catch (\Exception $e)
{
@@ -237,7 +229,6 @@ class acp_language
foreach ($iterator as $file_info)
{
/** @var \RecursiveDirectoryIterator $file_info */
$relative_path = $iterator->getInnerIterator()->getSubPathname();
$relative_path = str_replace(DIRECTORY_SEPARATOR, '/', $relative_path);