From 8d30dd172e1cab844d42471960b34304fc512373 Mon Sep 17 00:00:00 2001 From: Junior Date: Mon, 9 Nov 2026 19:03:11 -0500 Subject: [PATCH] Only use filemtime() if sorting by date --- ajax/getfoldercontents.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax/getfoldercontents.php b/ajax/getfoldercontents.php index 060e744..ba0e2a3 100644 --- a/ajax/getfoldercontents.php +++ b/ajax/getfoldercontents.php @@ -69,7 +69,7 @@ foreach ( $entries as $entry ) { if ( is_dir($fullcompath . $entry) ) { $info["comname"] = (strpos($entry, " - ") !== false) ? str_replace(" - ", "
", $entry) : $entry; $info["newpath"] = $compath . (($compath == "/") ? "" : "/") . $entry; - $info["mtime"] = filemtime($fullcompath . $entry); + if ( $_SESSION["sortorder"] == SORTBYDATE ) $info["mtime"] = filemtime($fullcompath . $entry); //$info["thumburl"] = htmlentities(THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . $entry, ENT_QUOTES) . ".jpg"; $info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . $entry . ".jpg"; if ( isset($comics_read[$entry]) ) { @@ -96,7 +96,7 @@ foreach ( $entries as $entry ) { } //$info["comname"] = substr(((strpos($entry, " - ") !== false) ? str_replace(" - ", "
", $entry) : $entry), 0, -4); $info["relcomic"] = base64_encode($compath . (($compath == "/") ? "" : "/") . $entry); - $info["mtime"] = filemtime($fullcompath . $entry); + if ( $_SESSION["sortorder"] == SORTBYDATE ) $info["mtime"] = filemtime($fullcompath . $entry); $info["thumburl"] = THUMBSDIR . $compath . (($compath == "/") ? "" : "/") . $withoutext . ".jpg"; if ( isset($issues_read[$entry]) ) { $info["read"] = true;