diff --git a/src/Cms/Page.php b/src/Cms/Page.php index 06d7f721b0..4ce3f35e32 100644 --- a/src/Cms/Page.php +++ b/src/Cms/Page.php @@ -827,9 +827,8 @@ public function modified( string|null $handler = null, string|null $languageCode = null ): int|string|false|null { - $modified = $this->storage()->modified( - VersionId::default($this), - $languageCode + $modified = $this->version(VersionId::default($this))->modified( + $languageCode ?? 'current' ); if ($modified === null) { diff --git a/src/Cms/User.php b/src/Cms/User.php index 90836f4943..595eaef93b 100644 --- a/src/Cms/User.php +++ b/src/Cms/User.php @@ -204,10 +204,7 @@ public function email(): string|null */ public function exists(): bool { - return $this->storage()->exists( - VersionId::published(), - 'default' - ); + return $this->version(VersionId::published())->exists('default'); } /** @@ -469,7 +466,7 @@ public function modified( string|null $handler = null, string|null $languageCode = null ): int|string|false { - $modifiedContent = $this->storage()->modified(VersionId::published(), $languageCode); + $modifiedContent = $this->version(VersionId::published())->modified($languageCode ?? 'current'); $modifiedIndex = F::modified($this->root() . '/index.php'); $modifiedTotal = max([$modifiedContent, $modifiedIndex]);