Upgrade to 3.8.1
This commit is contained in:
@@ -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(),
|
||||
|
@@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@@ -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' => [
|
||||
|
@@ -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;
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user