Upgrade Kirby from 4.3.0 to 4.4.0
This commit is contained in:
parent
03905dbd83
commit
3bed01af75
293 changed files with 54254 additions and 187 deletions
|
|
@ -352,12 +352,15 @@ class File extends Model
|
|||
$id = $this->model->id();
|
||||
|
||||
if (empty($params['model']) === false) {
|
||||
$parent = $this->model->parent();
|
||||
$parent = $this->model->parent();
|
||||
$absolute = $parent !== $params['model'];
|
||||
|
||||
// if the file belongs to the current parent model,
|
||||
// store only name as ID to keep its path relative to the model
|
||||
$id = $parent === $params['model'] ? $name : $id;
|
||||
$absolute = $parent !== $params['model'];
|
||||
$id = match ($absolute) {
|
||||
true => $id,
|
||||
false => $name
|
||||
};
|
||||
}
|
||||
|
||||
$params['text'] ??= '{{ file.filename }}';
|
||||
|
|
@ -399,6 +402,7 @@ class File extends Model
|
|||
'template' => $file->template(),
|
||||
'type' => $file->type(),
|
||||
'url' => $file->url(),
|
||||
'uuid' => fn () => $file->uuid()?->toString(),
|
||||
],
|
||||
'preview' => [
|
||||
'focusable' => $this->isFocusable(),
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ abstract class Model
|
|||
'link' => $this->url(true),
|
||||
'sortable' => true,
|
||||
'text' => $this->model->toSafeString($params['text'] ?? false),
|
||||
'uuid' => $this->model->uuid()?->toString() ?? $this->model->id(),
|
||||
'uuid' => $this->model->uuid()?->toString()
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ class Page extends Model
|
|||
'previewUrl' => $page->previewUrl(),
|
||||
'status' => $page->status(),
|
||||
'title' => $page->title()->toString(),
|
||||
'uuid' => fn () => $page->uuid()?->toString(),
|
||||
],
|
||||
'status' => function () use ($page) {
|
||||
if ($status = $page->status()) {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ class Site extends Model
|
|||
'link' => $this->url(true),
|
||||
'previewUrl' => $this->model->previewUrl(),
|
||||
'title' => $this->model->title()->toString(),
|
||||
'uuid' => fn () => $this->model->uuid()?->toString(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ class User extends Model
|
|||
'name' => $user->name()->toString(),
|
||||
'role' => $user->role()->title(),
|
||||
'username' => $user->username(),
|
||||
'uuid' => fn () => $user->uuid()?->toString()
|
||||
]
|
||||
]
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue