Skip to content

Commit 4b1c92d

Browse files
committed
updated autoid modified check
Signed-off-by: Bruno Meilick <b@bnomei.com>
1 parent 391d2e4 commit 4b1c92d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

classes/FingerprintFile.php

+9-4
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,19 @@ public function modified(): ?int
6161
return null;
6262
}
6363

64-
if ($this->isKirbyFile && function_exists('autoid') && $this->file->autoid()->isNotEmpty()) {
64+
$modified = null;
65+
if ($this->isKirbyFile && function_exists('modified') && $this->file->autoid()->isNotEmpty()) {
6566
// @codeCoverageIgnoreStart
66-
$autoid = autoid()->filterBy('autoid', $this->file->autoid())->first();
67-
return $autoid && is_array($autoid) ? A::get($autoid, 'modified') : F::modified($root);
67+
$modified = modified($this->file->autoid()->value());
68+
if (!$modified) {
69+
$modified = $this->file->modified();
70+
}
6871
// @codeCoverageIgnoreEnd
72+
} else {
73+
$modified = F::modified($root);
6974
}
7075

71-
return F::modified($root);
76+
return $modified;
7277
}
7378

7479
/**

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-fingerprint",
33
"type": "kirby-plugin",
4-
"version": "3.0.5",
4+
"version": "3.0.6",
55
"description": "File Method and css/js helper to add cachebusting hash and optional Subresource Integrity to file",
66
"license": "MIT",
77
"authors": [

0 commit comments

Comments
 (0)