Upgrade to 3.6.4

This commit is contained in:
Bastian Allgeier
2022-04-05 10:18:36 +02:00
parent 905981da5a
commit fee3f5253d
25 changed files with 1643 additions and 476 deletions

View File

@@ -203,12 +203,14 @@ class Blueprint
return $props;
}
try {
$mixin = static::find($extends);
$mixin = static::extend($mixin);
$props = A::merge($mixin, $props, A::MERGE_REPLACE);
} catch (Exception $e) {
// keep the props unextended if the snippet wasn't found
foreach (A::wrap($extends) as $extend) {
try {
$mixin = static::find($extend);
$mixin = static::extend($mixin);
$props = A::merge($mixin, $props, A::MERGE_REPLACE);
} catch (Exception $e) {
// keep the props unextended if the snippet wasn't found
}
}
// remove the extends flag

View File

@@ -54,7 +54,7 @@ class Fieldset extends Item
$this->editable = $params['editable'] ?? true;
$this->icon = $params['icon'] ?? null;
$this->model = $this->parent;
$this->name = $this->createName($params['name'] ?? Str::ucfirst($this->type));
$this->name = $this->createName($params['title'] ?? $params['name'] ?? Str::ucfirst($this->type));
$this->label = $this->createLabel($params['label'] ?? null);
$this->preview = $params['preview'] ?? null;
$this->tabs = $this->createTabs($params);

View File

@@ -347,6 +347,7 @@ abstract class ModelWithContent extends Model
$result = Str::query($query, [
'kirby' => $this->kirby(),
'site' => is_a($this, 'Kirby\Cms\Site') ? $this : $this->site(),
'model' => $this,
static::CLASS_ALIAS => $this
]);
} catch (Throwable $e) {

View File

@@ -25,7 +25,7 @@ class PageBlueprint extends Blueprint
// normalize all available page options
$this->props['options'] = $this->normalizeOptions(
$props['options'] ?? true,
$this->props['options'] ?? true,
// defaults
[
'changeSlug' => null,
@@ -50,10 +50,10 @@ class PageBlueprint extends Blueprint
);
// normalize the ordering number
$this->props['num'] = $this->normalizeNum($props['num'] ?? 'default');
$this->props['num'] = $this->normalizeNum($this->props['num'] ?? 'default');
// normalize the available status array
$this->props['status'] = $this->normalizeStatus($props['status'] ?? null);
$this->props['status'] = $this->normalizeStatus($this->props['status'] ?? null);
}
/**

View File

@@ -26,7 +26,7 @@ class SiteBlueprint extends Blueprint
// normalize all available page options
$this->props['options'] = $this->normalizeOptions(
$props['options'] ?? true,
$this->props['options'] ?? true,
// defaults
[
'changeTitle' => null,

View File

@@ -445,7 +445,7 @@ class System
}
// @codeCoverageIgnoreStart
$response = Remote::get('https://licenses.getkirby.com/register', [
$response = Remote::get('https://hub.getkirby.com/register', [
'data' => [
'license' => $license,
'email' => Str::lower(trim($email)),

View File

@@ -30,7 +30,7 @@ class UserBlueprint extends Blueprint
// normalize all available page options
$this->props['options'] = $this->normalizeOptions(
$props['options'] ?? true,
$this->props['options'] ?? true,
// defaults
[
'create' => null,

View File

@@ -500,11 +500,7 @@ class Html extends Xml
($attr['allowfullscreen'] ?? true) === true
) {
$attr['allow'] = 'fullscreen';
}
// remove deprecated attribute
if (isset($attr['allowfullscreen']) === true) {
unset($attr['allowfullscreen']);
$attr['allowfullscreen'] = true;
}
return $attr;