diff --git a/kirby/src/Cms/FileVersion.php b/kirby/src/Cms/FileVersion.php index 159da71..e16a627 100644 --- a/kirby/src/Cms/FileVersion.php +++ b/kirby/src/Cms/FileVersion.php @@ -42,7 +42,7 @@ class FileVersion // asset method proxy if (method_exists($this->asset(), $method)) { if ($this->exists() === false) { - $this->save(); + $this; } return $this->asset()->$method(...$arguments); diff --git a/kirby/src/Cms/Language.php b/kirby/src/Cms/Language.php index d9e3eba..b012261 100644 --- a/kirby/src/Cms/Language.php +++ b/kirby/src/Cms/Language.php @@ -178,7 +178,7 @@ class Language // validate the new language LanguageRules::create($language); - $language->save(); + $language; if ($languages->count() === 0) { foreach ($kirby->models() as $model) { @@ -549,7 +549,7 @@ class Language // if language just got promoted to be the new default language⦠if ($this->isDefault() === false && $updated->isDefault() === true) { // convert the current default to a non-default language - $previous = $kirby->defaultLanguage()?->clone(['default' => false])->save(); + $previous = $kirby->defaultLanguage()?->clone(['default' => false]); $kirby->languages(false)->set($previous->code(), $previous); foreach ($kirby->models() as $model) { @@ -567,7 +567,7 @@ class Language throw new LogicException('Please select another language to be the primary language'); } - $language = $updated->save(); + $language = $updated; // make sure the language is also updated in the languages collection $kirby->languages(false)->set($language->code(), $language); diff --git a/kirby/src/Cms/License.php b/kirby/src/Cms/License.php index 4aa09af..d3ca5f5 100644 --- a/kirby/src/Cms/License.php +++ b/kirby/src/Cms/License.php @@ -485,7 +485,7 @@ class License unset($this->status, $this->type); // save the new state of the license - $this->save(); + $this; return $this; } diff --git a/kirby/src/Form/Field.php b/kirby/src/Form/Field.php index cb95fd4..5edeb63 100644 --- a/kirby/src/Form/Field.php +++ b/kirby/src/Form/Field.php @@ -394,7 +394,7 @@ class Field extends Component { // check simple conditions first if ( - $this->save() === false || + $this === false || $this->isRequired() === false || $this->isEmpty() === false ) { @@ -442,7 +442,7 @@ class Field extends Component unset($array['model']); $array['hidden'] = $this->isHidden(); - $array['saveable'] = $this->save(); + $array['saveable'] = $this; $array['signature'] = md5(json_encode($array)); ksort($array); @@ -505,6 +505,6 @@ class Field extends Component */ public function value(): mixed { - return $this->save() ? $this->value : null; + return $this ? $this->value : null; } } diff --git a/kirby/src/Form/Form.php b/kirby/src/Form/Form.php index adec4f3..35cc021 100644 --- a/kirby/src/Form/Form.php +++ b/kirby/src/Form/Form.php @@ -87,7 +87,7 @@ class Form $field = static::exceptionField($e, $props); } - if ($field->save() !== false) { + if ($field !== false) { $this->values[$name] = $field->value(); } @@ -124,7 +124,7 @@ class Form $data = $this->values; foreach ($this->fields as $field) { - if ($field->save() === false || $field->unset() === true) { + if ($field === false || $field->unset() === true) { if ($includeNulls === true) { $data[$field->name()] = null; } else { diff --git a/kirby/src/Form/Validations.php b/kirby/src/Form/Validations.php index cf1235a..111cb56 100644 --- a/kirby/src/Form/Validations.php +++ b/kirby/src/Form/Validations.php @@ -189,7 +189,7 @@ class Validations { if ( $field->isRequired() === true && - $field->save() === true && + $field === true && $field->isEmpty($value) === true ) { throw new InvalidArgumentException([ diff --git a/site/config/config.php b/site/config/config.php index b9642d8..d64e8a2 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -13,7 +13,15 @@ return [ 'format' => 'webp' ], 'srcsets' => [ - 'default' => [200, 400, 600, 800, 1024, 1440, 2048], + 'default' => [ + ['width' => 200, 'format' => 'webp'], + ['width' => 400, 'format' => 'webp'], + ['width' => 600, 'format' => 'webp'], + ['width' => 800, 'format' => 'webp'], + ['width' => 1024, 'format' => 'webp'], + ['width' => 1440, 'format' => 'webp'], + ['width' => 2048, 'format' => 'webp'] + ], ], ], 'panel' => [ diff --git a/site/snippets/event-card.php b/site/snippets/event-card.php index 90f3cff..000474b 100644 --- a/site/snippets/event-card.php +++ b/site/snippets/event-card.php @@ -3,14 +3,14 @@