diff --git a/.idea/misc.xml b/.idea/misc.xml index 1f3de73..33fe132 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,16 +4,8 @@ diff --git a/app/FileViewer.php b/app/FileViewer.php index e90b65b..5a72d3c 100644 --- a/app/FileViewer.php +++ b/app/FileViewer.php @@ -4,8 +4,6 @@ namespace MingTsay\Akanyan; abstract class FileViewer { - protected static bool $orderDesc = false; - protected abstract static function directory(): string; protected abstract static function whitelist(): ?array; @@ -15,13 +13,10 @@ abstract class FileViewer $directory = static::directory(); $whitelist = static::whitelist(); - $list = array_values(array_filter( + return array_values(array_filter( scandir($directory), fn($file) => ($whitelist === null || in_array($file, $whitelist)) && is_file("$directory/$file") )); - - if (static::$orderDesc) rsort($list); - return $list; } public static function read($file): ?string diff --git a/app/LogsViewer.php b/app/LogsViewer.php index 911532d..5835706 100644 --- a/app/LogsViewer.php +++ b/app/LogsViewer.php @@ -4,7 +4,6 @@ namespace MingTsay\Akanyan; class LogsViewer extends FileViewer { - protected static bool $orderDesc = true; protected static function directory(): string { diff --git a/composer.lock b/composer.lock index 167ae09..ed4261f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "80d3ab8288e7bcecfa9435acfbd3bcc5", + "content-hash": "528c716c3d44b77191eaef0461fe108d", "packages": [ { "name": "components/font-awesome", @@ -725,6 +725,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { + "ext-iconv": "*", "ext-sodium": "*", "ext-zlib": "*" }, diff --git a/templates/index.php b/templates/index.php index 28192f9..ce92289 100644 --- a/templates/index.php +++ b/templates/index.php @@ -50,10 +50,6 @@
【更新紀錄】
檢視日誌時最新的檔案將出現於最前面。
-更新日期:2022/10/20 20:48:00
-首頁現在可以看到伺服器版本與線上人數等資訊了。
更新日期:2022/07/05 02:02:02