aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-03-17 00:50:08 +0700
committerrxu <rxu@mail.ru>2016-03-17 00:50:08 +0700
commite610b239169d604d5b880d14140f7fe25b15c392 (patch)
treeb4747fe08056e8f1fa3826002687c1ec1797edc7 /phpBB/phpbb
parentf1874ec4167973df7d2eeed0e5bc2ed3f4a59c04 (diff)
downloadforums-e610b239169d604d5b880d14140f7fe25b15c392.tar
forums-e610b239169d604d5b880d14140f7fe25b15c392.tar.gz
forums-e610b239169d604d5b880d14140f7fe25b15c392.tar.bz2
forums-e610b239169d604d5b880d14140f7fe25b15c392.tar.xz
forums-e610b239169d604d5b880d14140f7fe25b15c392.zip
[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
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/recursive_dot_prefix_filter_iterator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
index 2500ba0cf8..1446551b8b 100644
--- a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
+++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php
@@ -25,6 +25,6 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
public function accept()
{
$filename = $this->current()->getFilename();
- return !$this->current()->isDir() || $filename[0] !== '.';
+ return $filename[0] !== '.' || !$this->current()->isDir();
}
}