Fixing glob() handling in extract shell, added extract shell test, partial fix for #6044, code formatting changes in CakeTestCase.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8026 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2009-02-13 06:22:34 +00:00
parent 712fea65ab
commit 440c629931
3 changed files with 114 additions and 16 deletions

View file

@ -668,6 +668,9 @@ class ExtractTask extends Shell{
$files = glob("$path*.{php,ctp,thtml,inc,tpl}", GLOB_BRACE);
$dirs = glob("$path*", GLOB_ONLYDIR);
$files = $files ? $files : array();
$dirs = $dirs ? $dirs : array();
foreach ($dirs as $dir) {
if (!preg_match("!(^|.+/)(CVS|.svn)$!", $dir)) {
$files = array_merge($files, $this->__searchDirectory("$dir" . DS));