mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10663] Extension finder should not find subdirs with directory filter
The directory filter pattern now has a $ in the end, do avoid subdirectories from being matched as well. PHPBB3-10663
This commit is contained in:
parent
3762bf5e99
commit
41870c4095
1 changed files with 4 additions and 0 deletions
|
@ -375,6 +375,10 @@ class phpbb_extension_finder
|
||||||
{
|
{
|
||||||
$directory_pattern = preg_quote(DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
|
$directory_pattern = preg_quote(DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
|
||||||
}
|
}
|
||||||
|
if ($is_dir)
|
||||||
|
{
|
||||||
|
$directory_pattern .= '$';
|
||||||
|
}
|
||||||
$directory_pattern = '#' . $directory_pattern . '#';
|
$directory_pattern = '#' . $directory_pattern . '#';
|
||||||
|
|
||||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
|
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
|
||||||
|
|
Loading…
Add table
Reference in a new issue