From 69cbc96f1e52bf14a6aea7e144a17a0eb6163468 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 29 Mar 2016 15:27:56 +0200 Subject: [PATCH] Renamed function as it doesn't list any files but creates an array. --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 9429e6f..ee4e6a8 100644 --- a/index.php +++ b/index.php @@ -250,10 +250,10 @@ } // List files in a given directory, excluding certain files - function listFiles ($dir, $exclude) { + function createArrayFromPath ($dir, $exclude) { $file_array = array(); $dh = opendir($dir); - while (false !== ($filename = readdir($dh))) { + while ($filename = readdir($dh)) { $fqfn = $dir . DIRECTORY_SEPARATOR . $filename; if (is_file($fqfn) && !in_array($filename, $exclude)) $file_array[filemtime($fqfn)] = $filename; @@ -277,13 +277,13 @@ // Only read files if the feature is enabled if ($settings['listfiles']) { - $file_array = listFiles($data['uploaddir'], $data['ignores']); + $file_array = createArrayFromPath($data['uploaddir'], $data['ignores']); // Removing old files if ($settings['remove_old_files']) removeOldFiles($data['uploaddir']); - $file_array = listFiles($data['uploaddir'], $data['ignores']); + $file_array = createArrayFromPath($data['uploaddir'], $data['ignores']); } ?> -- 2.39.5