diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-07-03 11:26:07 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-07-03 11:26:07 +0200 |
commit | 520f3b3bd636b52608d134750464daf1b7a27493 (patch) | |
tree | 60c18a135b6ad844f36169282766a0aed9b57c09 | |
parent | fbc15407a215d82263cc37c3a3f897547945e4e5 (diff) | |
download | forums-520f3b3bd636b52608d134750464daf1b7a27493.tar forums-520f3b3bd636b52608d134750464daf1b7a27493.tar.gz forums-520f3b3bd636b52608d134750464daf1b7a27493.tar.bz2 forums-520f3b3bd636b52608d134750464daf1b7a27493.tar.xz forums-520f3b3bd636b52608d134750464daf1b7a27493.zip |
[ticket/12784] Shearch the "vendor" folders and then the autoload.php files
PHPBB3-12784
-rw-r--r-- | phpBB/includes/functions.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f820679144..0838f2008e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; + } } } } |