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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user