Skip to content

Commit

Permalink
Upgrade to 4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Sep 23, 2024
1 parent 8bc7250 commit 49287c7
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 42 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 core",
"license": "proprietary",
"type": "kirby-cms",
"version": "4.4.0",
"version": "4.4.1",
"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.

13 changes: 10 additions & 3 deletions kirby/config/areas/site/requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,19 @@
'action' => function () {
$kirby = App::instance();
$request = $kirby->request();
$root = $request->get('root');
$page = $kirby->page($request->get('page'));
$parents = $page?->parents()->flip()->values(
fn ($parent) => $parent->uuid()?->toString() ?? $parent->id()
) ?? [];

// if root is included, add the site as top-level parent
if ($root === 'true') {
array_unshift($parents, $kirby->site()->uuid()?->toString() ?? '/');
}

return [
'data' => $page->parents()->flip()->values(
fn ($parent) => $parent->uuid()?->toString() ?? $parent->id()
)
'data' => $parents
];
}
]
Expand Down
10 changes: 5 additions & 5 deletions kirby/i18n/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@
"error.form.notSaved": "항목을 저장할 수 없습니다.",

"error.language.code": "올바른 언어 코드를 입력하세요.",
"error.language.create.permission": "You are not allowed to create a language",
"error.language.delete.permission": "You are not allowed to delete the language",
"error.language.create.permission": "언어를 등록할 권한이 없습니다.",
"error.language.delete.permission": "언어를 삭제할 권한이 없습니다.",
"error.language.duplicate": "이미 등록한 언어입니다.",
"error.language.name": "올바른 언어명을 입력하세요.",
"error.language.notFound": "언어를 찾을 수 없습니다.",
"error.language.update.permission": "You are not allowed to update the language",
"error.language.update.permission": "언어를 변경할 권한이 없습니다.",

"error.layout.validation.block": "레이아웃({layoutIndex})의 특정 블록 유형({fieldset})을 사용하는 블록({blockIndex})의 특정 필드({field})에 오류가 있습니다.",
"error.layout.validation.settings": "레이아웃({index}) 옵션을 확인하세요.",
Expand Down Expand Up @@ -620,8 +620,8 @@
"stats.empty": "관련 기록이 없습니다.",
"status": "상태",

"system.info.copy": "Copy info",
"system.info.copied": "System info copied",
"system.info.copy": "정보 복사",
"system.info.copied": "시스템 정보가 복사되었습니다.",
"system.issues.content": "<code>/content</code> 폴더의 권한을 확인하세요.",
"system.issues.eol.kirby": "설치된 Kirby 버전이 만료되었습니다. 더 이상 보안 업데이트를 받을 수 없습니다.",
"system.issues.eol.plugin": "설치된 플러그인({plugin}의 지원이 종료되었습니다. 더 이상 보안 업데이트를 받을 수 없습니다.",
Expand Down
2 changes: 1 addition & 1 deletion kirby/panel/dist/js/index.min.js

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions kirby/src/Cms/LanguageRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Kirby\Cms;

use Kirby\Filesystem\F;
use Kirby\Toolkit\Str;

class LanguageRoutes
{
Expand All @@ -30,26 +29,9 @@ public static function create(App $kirby): array
'pattern' => $language->pattern(),
'method' => 'ALL',
'env' => 'site',
'action' => function ($path = null) use ($kirby, $language) {
'action' => function ($path = null) use ($language) {
$result = $language->router()->call($path);

// redirect secondary-language pages that have
// been accessed with non-translated slugs in their path
// to their fully translated URL
if ($path !== null && $result instanceof Page) {
if (Str::endsWith($result->url(), $path) === false) {
$url = $result->url();
$query = $kirby->request()->query()->toString();

// preserve query across redirect
if (empty($query) === false) {
$url .= '?' . $query;
}

return $kirby->response()->redirect($url);
}
}

// explicitly test for null as $result can
// contain falsy values that should still be returned
if ($result !== null) {
Expand Down
11 changes: 5 additions & 6 deletions kirby/src/Filesystem/Filename.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Kirby\Filesystem;

use Kirby\Cms\App;
use Kirby\Cms\Language;
use Kirby\Toolkit\Str;

Expand Down Expand Up @@ -49,7 +48,8 @@ class Filename
public function __construct(
protected string $filename,
protected string $template,
protected array $attributes = []
protected array $attributes = [],
protected string|null $language = null
) {
$this->name = $this->sanitizeName($filename);
$this->extension = $this->sanitizeExtension(
Expand Down Expand Up @@ -234,13 +234,12 @@ protected function sanitizeName(string $name): string
{
// temporarily store language rules
$rules = Str::$language;
$kirby = App::instance(null, true);

// if current user, add rules for their language to `Str` class
if ($user = $kirby?->user()) {
// add rules for a particular language to `Str` class
if ($this->language !== null) {
Str::$language = [
...Str::$language,
...Language::loadRules($user->language())];
...Language::loadRules($this->language)];
}

// sanitize name
Expand Down
12 changes: 6 additions & 6 deletions kirby/vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'getkirby/cms',
'pretty_version' => '4.4.0',
'version' => '4.4.0.0',
'reference' => NULL,
'pretty_version' => '4.4.1',
'version' => '4.4.1.0',
'reference' => null,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -47,9 +47,9 @@
'dev_requirement' => false,
),
'getkirby/cms' => array(
'pretty_version' => '4.4.0',
'version' => '4.4.0.0',
'reference' => NULL,
'pretty_version' => '4.4.1',
'version' => '4.4.1.0',
'reference' => null,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit 49287c7

Please sign in to comment.