Skip to content

Commit

Permalink
Upgrade to 3.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Mar 8, 2023
1 parent c58864a commit 3b0b4fe
Show file tree
Hide file tree
Showing 44 changed files with 674 additions and 203 deletions.
2 changes: 1 addition & 1 deletion kirby/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "The Kirby 3 core",
"license": "proprietary",
"type": "kirby-cms",
"version": "3.9.1",
"version": "3.9.2",
"keywords": [
"kirby",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion kirby/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions kirby/config/methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
try {
$blocks = Blocks::parse($field->value());
$blocks = Blocks::factory($blocks, [
'parent' => $field->parent()
'parent' => $field->parent(),
'field' => $field,
]);
return $blocks->filter('isHidden', false);
} catch (Throwable) {
Expand Down Expand Up @@ -192,7 +193,8 @@
*/
'toLayouts' => function (Field $field) {
return Layouts::factory(Layouts::parse($field->value()), [
'parent' => $field->parent()
'parent' => $field->parent(),
'field' => $field,
]);
},

Expand Down Expand Up @@ -276,10 +278,10 @@
* Converts the field value to a Unix timestamp
*
* @param \Kirby\Cms\Field $field
* @return int
* @return int|false
*/
'toTimestamp' => function (Field $field): int {
return strtotime($field->value);
'toTimestamp' => function (Field $field): int|false {
return strtotime($field->value ?? '');
},

/**
Expand Down Expand Up @@ -394,7 +396,7 @@
// Obsolete elements, script tags, image maps and form elements have
// been excluded for safety reasons and as they are most likely not
// needed in most cases.
$field->value = strip_tags($field->value, Html::$inlineList);
$field->value = strip_tags($field->value ?? '', Html::$inlineList);
return $field;
},

Expand Down Expand Up @@ -481,7 +483,7 @@
* @return \Kirby\Cms\Field
*/
'nl2br' => function (Field $field) {
$field->value = nl2br($field->value, false);
$field->value = nl2br($field->value ?? '', false);
return $field;
},

Expand Down
5 changes: 5 additions & 0 deletions kirby/config/sections/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
// search
if ($this->search === true && empty($this->searchterm()) === false) {
$files = $files->search($this->searchterm());

// disable flip and sortBy while searching
// to show most relevant results
$this->flip = false;
$this->sortBy = null;
}

// sort
Expand Down
5 changes: 5 additions & 0 deletions kirby/config/sections/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
// search
if ($this->search === true && empty($this->searchterm()) === false) {
$pages = $pages->search($this->searchterm());

// disable flip and sortBy while searching
// to show most relevant results
$this->flip = false;
$this->sortBy = null;
}

// sort
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Forgot your password?",
"login.toggleText.password-reset.email-password": "← Back to login",

"logout": "Tancar sessi\u00f3",
"logout": "Tancar sessió",

"menu": "Menú",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Zapomenuté heslo?",
"login.toggleText.password-reset.email-password": "← Zpět na přihlášení",

"logout": "Odhl\u00e1sit se",
"logout": "Odhlásit se",

"menu": "Menu",
"meridiem": "AM/PM",
Expand Down
8 changes: 4 additions & 4 deletions kirby/i18n/translations/de.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account.changeName": "Deinen Namen ändern",
"account.delete": "Deinen Account löschen",
"account.delete.confirm": "Willst du deinen Account wirklich löschen? Du wirst sofort danach abgemeldet. Dein Account kann nicht wieder hergestellt werden. ",
"account.delete.confirm": "Willst du deinen Account wirklich löschen? Du wirst sofort danach abgemeldet. Dein Account kann nicht wieder hergestellt werden.",

"add": "Hinzuf\u00fcgen",
"author": "Autor",
Expand Down Expand Up @@ -77,7 +77,7 @@
"error.email.preset.notFound": "Die E-Mailvorlage \"{name}\" wurde nicht gefunden",

"error.field.converter.invalid": "Ungültiger Konverter: \"{converter}\"",
"error.field.type.missing": "Feld \"{ name }\": Der Feld Typ \"{ type }\" existiert nicht",
"error.field.type.missing": "Feld \"{ name }\": Der Feldtyp \"{ type }\" existiert nicht",

"error.file.changeName.empty": "Bitte gib einen Namen an",
"error.file.changeName.permission": "Du darfst den Dateinamen von \"{filename}\" nicht ändern",
Expand Down Expand Up @@ -110,7 +110,7 @@
"error.language.name": "Bitte gib einen gültigen Namen für die Sprache an",
"error.language.notFound": "Die Sprache konnte nicht gefunden werden",

"error.layout.validation.block": "Fehler im \"{field}\" Feld in Block {blockIndex} mit dem Block Typ \"{fieldset}\" in Layout {layoutIndex}",
"error.layout.validation.block": "Fehler im \"{field}\" Feld in Block {blockIndex} mit dem Blocktyp \"{fieldset}\" in Layout {layoutIndex}",
"error.layout.validation.settings": "Fehler in den Einstellungen von Layout {index}",

"error.license.format": "Bitte gib einen gültigen Lizenzschlüssel ein",
Expand Down Expand Up @@ -165,7 +165,7 @@

"error.template.default.notFound": "Die \"Default\"-Vorlage existiert nicht",

"error.unexpected": "Ein unerwarteter Fehler ist aufgetreten. Aktiviere den Debug Modus für weitere Informationen: https://getkirby.com/docs/reference/system/options/debug",
"error.unexpected": "Ein unerwarteter Fehler ist aufgetreten. Aktiviere den Debug-Modus für weitere Informationen: https://getkirby.com/docs/reference/system/options/debug",

"error.user.changeEmail.permission": "Du kannst die E-Mailadresse für den Account \"{name}\" nicht ändern",
"error.user.changeLanguage.permission": "Du kannst die Sprache für den Account \"{name}\" nicht ändern",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Forgot your password?",
"login.toggleText.password-reset.email-password": "← Back to login",

"logout": "\u0391\u03c0\u03bf\u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03b7",
"logout": "Αποσύνδεση",

"menu": "Μενού",
"meridiem": "Π.Μ./Μ.Μ",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Forgot your password?",
"login.toggleText.password-reset.email-password": "← Back to login",

"logout": "Logout",
"logout": "Log out",

"menu": "Menu",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/es_419.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "¿Olvidaste tu contraseña?",
"login.toggleText.password-reset.email-password": "← Volver al inicio de sesión",

"logout": "Cerrar sesi\u00f3n",
"logout": "Cerrar sesión",

"menu": "Menù",
"meridiem": "AM/PM",
Expand Down
12 changes: 6 additions & 6 deletions kirby/i18n/translations/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"close": "Cerrar",
"confirm": "Confirmar",
"collapse": "Colapsar",
"collapse.all": "Colapsar todos",
"collapse.all": "Colapsar todo",
"copy": "Copiar",
"copy.all": "Copiar todo",
"create": "Crear",
Expand All @@ -32,7 +32,7 @@
"debugging": "Depuración",

"delete": "Eliminar",
"delete.all": "Eliminar todos",
"delete.all": "Eliminar todo",

"dialog.files.empty": "No hay archivos para seleccionar",
"dialog.pages.empty": "No hay páginas para seleccionar",
Expand Down Expand Up @@ -86,14 +86,14 @@
"error.file.extension.invalid": "Extensión inválida: {extension}",
"error.file.extension.missing": "Falta la extensión para \"{filename}\"",
"error.file.maxheight": "La altura de la imagen no debe exceder {height} pixeles",
"error.file.maxsize": "El archivo es muy grande",
"error.file.maxsize": "El archivo es demasiado grande",
"error.file.maxwidth": "El ancho de la imagen no debe exceder {width} pixeles",
"error.file.mime.differs": "El archivo cargado debe ser del mismo tipo mime \"{mime}\"",
"error.file.mime.forbidden": "Los medios tipo \"{mime}\" no están permitidos",
"error.file.mime.invalid": "Tipo invalido de mime: {mime}",
"error.file.mime.invalid": "Tipo de mime inválido: {mime}",
"error.file.mime.missing": "El tipo de medio para \"{filename}\" no puede ser detectado",
"error.file.minheight": "La altura de la imagen debe ser de al menos {height} pixeles",
"error.file.minsize": "El archivo es muy pequeño",
"error.file.minsize": "El archivo es demasiado pequeño",
"error.file.minwidth": "El ancho de la imagen debe ser de al menos {width} pixeles",
"error.file.name.missing": "El nombre de archivo no debe estar vacío",
"error.file.notFound": "El archivo \"{filename}\" no puede ser encontrado",
Expand Down Expand Up @@ -519,7 +519,7 @@
"system.updateStatus.update": "Actualización gratuita {version} disponible",
"system.updateStatus.upgrade": "Actualización {versión} disponible",

"title": "Titulo",
"title": "Título",
"template": "Plantilla",
"today": "Hoy",

Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Mot de passe oublié ?",
"login.toggleText.password-reset.email-password": "← Retour à la connexion",

"logout": "Se déconnecter",
"logout": "Déconnexion",

"menu": "Menu",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "암호 찾기",
"login.toggleText.password-reset.email-password": "로그인 화면으로",

"logout": "\ub85c\uadf8\uc544\uc6c3",
"logout": "로그아웃",

"menu": "메뉴",
"meridiem": "오전/오후",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Zapomniałeś/-aś hasła?",
"login.toggleText.password-reset.email-password": "← Powrót do logowania",

"logout": "Wyloguj",
"logout": "Wyloguj się",

"menu": "Menu",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion kirby/i18n/translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Şifrenizi mi unuttunuz?",
"login.toggleText.password-reset.email-password": "← Girişe geri dön",

"logout": "Güvenli Çıkış",
"logout": "Oturumu kapat",

"menu": "Menü",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion kirby/panel/dist/js/index.js

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions kirby/src/Cms/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,28 +482,23 @@ public function controller(string $name, array $arguments = [], string $contentT

/**
* Try to find a controller by name
*
* @param string $name
* @param string $contentType
* @return \Kirby\Toolkit\Controller|null
*/
protected function controllerLookup(string $name, string $contentType = 'html')
protected function controllerLookup(string $name, string $contentType = 'html'): Controller|null
{
if ($contentType !== null && $contentType !== 'html') {
$name .= '.' . $contentType;
}

// controller on disk
if ($controller = Controller::load($this->root('controllers') . '/' . $name . '.php')) {
// controller from site root
$controller = Controller::load($this->root('controllers') . '/' . $name . '.php');
// controller from extension
$controller ??= $this->extension('controllers', $name);

if ($controller instanceof Controller) {
return $controller;
}

// registry controller
if ($controller = $this->extension('controllers', $name)) {
if ($controller instanceof Controller) {
return $controller;
}

if ($controller !== null) {
return new Controller($controller);
}

Expand Down
13 changes: 13 additions & 0 deletions kirby/src/Cms/AppPlugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Closure;
use Kirby\Exception\DuplicateException;
use Kirby\Filesystem\Asset;
use Kirby\Filesystem\Dir;
use Kirby\Filesystem\F;
use Kirby\Filesystem\Mime;
Expand Down Expand Up @@ -45,6 +46,7 @@ trait AppPlugins
// other plugin types
'api' => [],
'areas' => [],
'assetMethods' => [],
'authChallenges' => [],
'blockMethods' => [],
'blockModels' => [],
Expand Down Expand Up @@ -147,6 +149,17 @@ protected function extendAreas(array $areas): array
return $this->extensions['areas'];
}

/**
* Registers additional asset methods
*
* @param array $methods
* @return array
*/
protected function extendAssetMethods(array $methods): array
{
return $this->extensions['assetMethods'] = Asset::$methods = array_merge(Asset::$methods, $methods);
}

/**
* Registers additional authentication challenges
*
Expand Down
7 changes: 7 additions & 0 deletions kirby/src/Cms/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ public function __construct(array $params)
{
parent::__construct($params);

// @deprecated import old builder format
// @todo block.converter remove eventually
// @codeCoverageIgnoreStart
$params = BlockConverter::builderBlock($params);
$params = BlockConverter::editorBlock($params);
// @codeCoverageIgnoreEnd

if (isset($params['type']) === false) {
throw new InvalidArgumentException('The block type is missing');
}
Expand Down
Loading

0 comments on commit 3b0b4fe

Please sign in to comment.