removing unneeded code lines in Folder->find(), which will never fire according to Folder->read()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7575 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
DarkAngelBGE 2008-09-09 04:39:43 +00:00
parent 8346bba694
commit ab167ffb9f

View file

@ -190,20 +190,15 @@ class Folder extends Object {
* @access public
*/
function find($regexp_pattern = '.*', $sort = false) {
$data = $this->read($sort);
list($dirs, $files) = $this->read($sort);
if (!is_array($data)) {
return array();
}
list($dirs, $files) = $data;
$found = array();
foreach ($files as $file) {
if (preg_match("/^{$regexp_pattern}$/i", $file)) {
$found[] = $file;
}
}
return $found;
}
/**