Upgrade to 3.8.1

This commit is contained in:
Bastian Allgeier
2022-10-18 14:11:15 +02:00
parent 94b2a32baf
commit 9c93e01c3a
71 changed files with 633 additions and 5705 deletions

View File

@@ -29,9 +29,9 @@ return [
'siblings' => function (Page $page) {
if ($page->isDraft() === true) {
return $page->parentModel()->children()->not($page);
} else {
return $page->siblings();
}
return $page->siblings();
},
'slug' => fn (Page $page) => $page->slug(),
'status' => fn (Page $page) => $page->status(),

View File

@@ -1,6 +1,7 @@
<?php
use Kirby\Toolkit\I18n;
use Kirby\Toolkit\Str;
return [
'props' => [
@@ -68,13 +69,13 @@ return [
},
/**
* Whether to store UUID or path in
* the content file
* Whether to store UUID or ID in the
* content file of the model
*
* @param string $store 'uuid'|'id'
*/
'store' => function (string $store = 'uuid') {
return $store;
return Str::lower($store);
},
/**

View File

@@ -49,9 +49,9 @@ return [
'value' => function () {
if ($this->props['value'] === null) {
return $this->default();
} else {
return $this->toBool($this->props['value']);
}
return $this->toBool($this->props['value']);
}
],
'methods' => [

View File

@@ -3,10 +3,10 @@
use Kirby\Cms\App;
use Kirby\Cms\Helpers;
use Kirby\Cms\Html;
use Kirby\Cms\Response;
use Kirby\Cms\Url;
use Kirby\Filesystem\Asset;
use Kirby\Filesystem\F;
use Kirby\Http\Response;
use Kirby\Http\Router;
use Kirby\Toolkit\Date;
use Kirby\Toolkit\I18n;

View File

@@ -112,7 +112,7 @@ return function ($kirby) {
// this ensures that only existing UUIDs can be queried
// and attackers can't force Kirby to go through the whole
// site index with a non-existing UUID
if ($model = Uuid::for($type . '://' . $id)->model(true)) {
if ($model = Uuid::for($type . '://' . $id)?->model(true)) {
return $kirby
->response()
->redirect($model->url());