From fc8c65a6d2fdb112da0b110f4dcadb29ba3bbbd1 Mon Sep 17 00:00:00 2001 From: SeriousBuggie <70026933+SeriousBuggie@users.noreply.github.com> Date: Sat, 22 Aug 2020 18:40:54 +0300 Subject: [PATCH] Speed up out --- classes/DirectoryListDetailed.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/classes/DirectoryListDetailed.php b/classes/DirectoryListDetailed.php index e3962db..aea9ace 100755 --- a/classes/DirectoryListDetailed.php +++ b/classes/DirectoryListDetailed.php @@ -166,13 +166,11 @@ class DirectoryListDetailed extends DirectoryList $old = getcwd(); chdir($path); $mtime = array_map('filemtime', $this->contents); - $types = array_map('filetype', $this->contents); $size = array_map('filesize', $this->contents); chdir($old); foreach ($this as $t) { - $type = $types[$this->key()]; - if ($type == 'dir') + if ($this->is_dir($t)) { $temp = new DirItem($path, $t, $mtime[$this->key()]); if ($temp -> __get('is_parent_dir')) @@ -189,7 +187,7 @@ class DirectoryListDetailed extends DirectoryList } } } - else if ($type == 'file') + else { $temp = new FileItem($path, $t, true, $size[$this->key()], $mtime[$this->key()]); $files[] = $temp;