Upgrade to 3.8.1
This commit is contained in:
@@ -8,6 +8,7 @@ use Kirby\Exception\LogicException;
|
||||
use Kirby\Filesystem\F;
|
||||
use Kirby\Form\Form;
|
||||
use Kirby\Uuid\Uuid;
|
||||
use Kirby\Uuid\Uuids;
|
||||
|
||||
/**
|
||||
* FileActions
|
||||
@@ -155,7 +156,9 @@ trait FileActions
|
||||
$copy = $page->clone()->file($this->filename());
|
||||
|
||||
// overwrite with new UUID (remove old, add new)
|
||||
$copy = $copy->save(['uuid' => Uuid::generate()]);
|
||||
if (Uuids::enabled() === true) {
|
||||
$copy = $copy->save(['uuid' => Uuid::generate()]);
|
||||
}
|
||||
|
||||
return $copy;
|
||||
}
|
||||
@@ -191,7 +194,9 @@ trait FileActions
|
||||
|
||||
// make sure that a UUID gets generated and
|
||||
// added to content right away
|
||||
$content['uuid'] = Uuid::generate();
|
||||
if (Uuids::enabled() === true) {
|
||||
$content['uuid'] ??= Uuid::generate();
|
||||
}
|
||||
|
||||
// create a form for the file
|
||||
$form = Form::for($file, ['values' => $content]);
|
||||
@@ -336,7 +341,7 @@ trait FileActions
|
||||
$this->lock()?->remove();
|
||||
|
||||
// clear UUID cache
|
||||
$this->uuid()->clear();
|
||||
$this->uuid()?->clear();
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user