]> git.mxchange.org Git - simple-upload.git/blobdiff - index.php
Use more braces to easily add more function calls
[simple-upload.git] / index.php
index e32486df394cb1f9427da0cc6021cc92e9fa6196..02f1f0f2408ced86ec5770e5432c13d8dc820320 100644 (file)
--- a/index.php
+++ b/index.php
                        $file_array = diverseArray($_FILES['file']);
                        foreach ($file_array as $file_data)
                                uploadFile($file_data);
-               } else
+               } else {
                        uploadFile($_FILES['file']);
+               }
                exit;
        }
 
                global $data;
 
                $file_array = array();
+
                $dh = opendir($dir);
-                       while ($filename = readdir($dh)) {
-                               $fqfn = $dir . DIRECTORY_SEPARATOR . $filename;
-                               if (isReadableFile($fqfn) && !in_array($filename, $data['ignores']))
-                                       $file_array[filemtime($fqfn)] = $filename;
-                       }
+
+               while ($filename = readdir($dh)) {
+                       $fqfn = $dir . DIRECTORY_SEPARATOR . $filename;
+                       if (isReadableFile($fqfn) && !in_array($filename, $data['ignores']))
+                               $file_array[filemtime($fqfn)] = $filename;
+               }
 
                ksort($file_array);
+
                $file_array = array_reverse($file_array, true);
+
                return $file_array;
        }