mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
[ticket/12268] Do not search in folders starting with a dot
PHPBB3-12268
This commit is contained in:
parent
329eb7c2b1
commit
59af5f4cbf
1 changed files with 2 additions and 7 deletions
|
@ -12,7 +12,7 @@ namespace phpbb\extension;
|
||||||
/**
|
/**
|
||||||
* Class recursive_filter_iterator
|
* Class recursive_filter_iterator
|
||||||
*
|
*
|
||||||
* This Filter ignores .svn and .git directories.
|
* This filter ignores directories starting with a dot.
|
||||||
* When searching for php classes and template files of extensions
|
* When searching for php classes and template files of extensions
|
||||||
* we don't need to look inside these directories.
|
* we don't need to look inside these directories.
|
||||||
*
|
*
|
||||||
|
@ -20,13 +20,8 @@ namespace phpbb\extension;
|
||||||
*/
|
*/
|
||||||
class recursive_filter_iterator extends \RecursiveFilterIterator
|
class recursive_filter_iterator extends \RecursiveFilterIterator
|
||||||
{
|
{
|
||||||
public static $ignore_folders = array(
|
|
||||||
'.svn',
|
|
||||||
'.git',
|
|
||||||
);
|
|
||||||
|
|
||||||
public function accept()
|
public function accept()
|
||||||
{
|
{
|
||||||
return !in_array($this->current()->getFilename(), self::$ignore_folders);
|
return !$this->current()->isDir() || substr($this->current()->getFilename(), 0, 1) !== '.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue