From 5902f56e841cbb7e07a6d5a0b2cdfec7fddee4ed Mon Sep 17 00:00:00 2001 From: trendschau Date: Sun, 18 May 2025 13:50:24 +0200 Subject: [PATCH] V2.17.1 fix last modified for non-published pages --- cache/timer.yaml | 2 +- system/typemill/Models/Meta.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cache/timer.yaml b/cache/timer.yaml index 706c30b..a29e94a 100644 --- a/cache/timer.yaml +++ b/cache/timer.yaml @@ -1 +1 @@ -licenseupdate: 1747561267 +licenseupdate: 1747568554 diff --git a/system/typemill/Models/Meta.php b/system/typemill/Models/Meta.php index bceccc1..68a7313 100644 --- a/system/typemill/Models/Meta.php +++ b/system/typemill/Models/Meta.php @@ -21,7 +21,13 @@ class Meta { $metadata = $this->storage->getYaml('contentFolder', '', $item->pathWithoutType . '.yaml'); - $metadata['meta']['modified'] = $this->storage->getFileTime('contentFolder', '', $item->pathWithoutType . '.md'); + $modified = $this->storage->getFileTime('contentFolder', '', $item->pathWithoutType . '.md'); + if(!$modified) + { + $modified = $this->storage->getFileTime('contentFolder', '', $item->pathWithoutType . '.txt'); + } + + $metadata['meta']['modified'] = $modified; return $metadata; }