mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +00:00
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:
parent
8346bba694
commit
ab167ffb9f
1 changed files with 2 additions and 7 deletions
|
@ -190,20 +190,15 @@ class Folder extends Object {
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function find($regexp_pattern = '.*', $sort = false) {
|
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();
|
$found = array();
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if (preg_match("/^{$regexp_pattern}$/i", $file)) {
|
if (preg_match("/^{$regexp_pattern}$/i", $file)) {
|
||||||
$found[] = $file;
|
$found[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $found;
|
return $found;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue