mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12784] Shearch the "vendor" folders and then the autoload.php files
PHPBB3-12784
This commit is contained in:
parent
fbc15407a2
commit
520f3b3bd6
1 changed files with 7 additions and 3 deletions
|
@ -36,13 +36,17 @@ function phpbb_load_extensions_autoloaders($phpbb_root_path)
|
|||
),
|
||||
\RecursiveIteratorIterator::SELF_FIRST
|
||||
);
|
||||
$iterator->setMaxDepth(3);
|
||||
$iterator->setMaxDepth(2);
|
||||
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
if ($file_info->getFilename() === 'autoload.php' && $file_info->getPathInfo()->getFilename() === 'vendor')
|
||||
if ($file_info->getFilename() === 'vendor' && $iterator->getDepth() === 2)
|
||||
{
|
||||
require $file_info->getRealPath();
|
||||
$filename = $file_info->getRealPath() . '/autoload.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
require $filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue