]> git.mxchange.org Git - simple-upload.git/commitdiff
Only read files for listing them if the feature is enabled.
authorRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2016 13:10:18 +0000 (15:10 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 29 Mar 2016 13:11:37 +0000 (15:11 +0200)
index.php

index 7ecb92709b15ea00de131bdaffec0c14b818d78c..0746448ce6c242f9647b0d2c9743d2dcf50f46ec 100644 (file)
--- a/index.php
+++ b/index.php
                }
        }
 
-       $file_array = listFiles($data['uploaddir'], $data['ignores']);
+       // Only read files if the feature is enabled
+       if ($settings['listfiles']) {
+               $file_array = listFiles($data['uploaddir'], $data['ignores']);
 
-       // Removing old files
-       if ($settings['remove_old_files'])
-               removeOldFiles($data['uploaddir']);
+               // Removing old files
+               if ($settings['remove_old_files'])
+                       removeOldFiles($data['uploaddir']);
 
-       $file_array = listFiles($data['uploaddir'], $data['ignores']);
-       //die(print_r($file_array, TRUE));
+               $file_array = listFiles($data['uploaddir'], $data['ignores']);
+       }
 ?>
 <!DOCTYPE html>
 <html lang="<?=$settings['lang']?>" dir="<?=$settings['lang_dir']?>">