1
0
Fork 0
This commit is contained in:
Ziver Koc 2009-11-08 02:38:57 +00:00
parent c062433e9b
commit a988babb77

View file

@ -123,20 +123,18 @@ function getFileArray($foldername) {
GLOBAL $localDir, $skip_filetype, $tempFilesArray;
$dirhandle = @opendir($foldername); //öppnar mappen
$temp = 0;
if($dirhandle !== false){ //gick det att öppna mappen?
while($filename = readdir($dirhandle)){ //loopar igenom alla filer i mappen
$filepath = $foldername ."/". $filename;
if($temp>1 && is_dir($filepath)){ //är det en mapp?
if($filename != "." && $filename != ".." && is_dir($filepath)){ //är det en mapp?
getFileArray($filepath);
}
else{ // its a file
else{ // its a file
$filetype = ereg_replace("^.+\\.([^.]+)$", "\\1", $filename);
if (!in_array($filetype, $skip_filetype)) {
$tempFilesArray[] = array(filemtime($filepath),str_replace($localDir, "", $filepath),("http://".$_SERVER['SERVER_NAME'].str_replace("sync.php","",$_SERVER['SCRIPT_NAME']).$filepath),$filename);
}
}
$temp++;
}
}
return $tempFilesArray;