]> git.mxchange.org Git - simple-upload.git/commitdiff
Only listing files (hiding directories)
authors-ko <aleks@s-ko.net>
Thu, 25 Sep 2014 21:59:42 +0000 (22:59 +0100)
committers-ko <aleks@s-ko.net>
Thu, 25 Sep 2014 21:59:42 +0000 (22:59 +0100)
index.php

index 6dc2bbd83b12cf9839e5e54c795d3c1fa5140620..513d7d14fc567a6b6f83c1c20db660d8d46a2be3 100644 (file)
--- a/index.php
+++ b/index.php
                                <?php
                                        $dh = opendir($settings['uploaddir']);
                                        while (false !== ($filename = readdir($dh)))
-                                               if (!in_array($filename, array('.', '..', $data['scriptname']))) {
+                                               if (is_file($filename) && !in_array($filename, array('.', '..', $data['scriptname']))) {
                                                        $file_info = array();
 
                                                        if ($settings['listfiles_size'])