mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14540] Adjust recursive_dot_prefix_filter_iterator for performance
Swapping conditions in the function accept() of the class \phpbb\recursive_dot_prefix_filter_iterator saves a lot of isDir() calls which is more expensive than $filename[0] checks. PHPBB3-14540
This commit is contained in:
parent
f1874ec416
commit
e610b23916
1 changed files with 1 additions and 1 deletions
|
@ -25,6 +25,6 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
|
||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
$filename = $this->current()->getFilename();
|
$filename = $this->current()->getFilename();
|
||||||
return !$this->current()->isDir() || $filename[0] !== '.';
|
return $filename[0] !== '.' || !$this->current()->isDir();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue