diff --git a/application/models/mydir.php b/application/models/mydir.php index d61a0cf1..2b9283e3 100755 --- a/application/models/mydir.php +++ b/application/models/mydir.php @@ -35,6 +35,20 @@ class mydir{ return $this->list[count($this->list)-1]; } + function array_flat($array) + { + foreach($array as $a) + { + if(is_array($a)) + { + $tmp = array_merge($tmp, array_flat($a)); + }else { + $tmp[] = $a; + } + } + return $tmp; + } + function recursive($dir) { $files = array(); @@ -57,19 +71,5 @@ class mydir{ closedir($handle); } return $this->array_flat($files); - } - - function array_flat($array) - { - foreach($array as $a) - { - if(is_array($a)) - { - $tmp = array_merge($tmp, array_flat($a)); - }else { - $tmp[] = $a; - } - } - return $tmp; - } + } } \ No newline at end of file