mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 06:48:42 +00:00
Fix some backwards compatibility issues in FSTools::globr.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1588 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
0d9c05d13c
commit
18320d59a4
@ -133,7 +133,10 @@ class FSTools
|
|||||||
*/
|
*/
|
||||||
public function globr($dir, $pattern, $flags = NULL) {
|
public function globr($dir, $pattern, $flags = NULL) {
|
||||||
$files = $this->glob("$dir/$pattern", $flags);
|
$files = $this->glob("$dir/$pattern", $flags);
|
||||||
foreach ($this->glob("$dir/*", GLOB_ONLYDIR) as $sub_dir) {
|
if ($files === false) $files = array();
|
||||||
|
$sub_dirs = $this->glob("$dir/*", GLOB_ONLYDIR);
|
||||||
|
if ($sub_dirs === false) $sub_dirs = array();
|
||||||
|
foreach ($sub_dirs as $sub_dir) {
|
||||||
$sub_files = $this->globr($sub_dir, $pattern, $flags);
|
$sub_files = $this->globr($sub_dir, $pattern, $flags);
|
||||||
$files = array_merge($files, $sub_files);
|
$files = array_merge($files, $sub_files);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user