Skip to content

Commit

Permalink
Merge pull request #6666 from getkirby/release/4.4.0
Browse files Browse the repository at this point in the history
4.4.0
  • Loading branch information
bastianallgeier authored Sep 12, 2024
2 parents 576306d + 103f139 commit d14bc47
Show file tree
Hide file tree
Showing 178 changed files with 2,778 additions and 1,454 deletions.
10 changes: 5 additions & 5 deletions 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.3.1",
"version": "4.4.0",
"keywords": [
"kirby",
"cms",
Expand Down Expand Up @@ -38,15 +38,15 @@
"ext-openssl": "*",
"christian-riesen/base32": "1.6.0",
"claviska/simpleimage": "4.2.0",
"composer/semver": "3.4.0",
"composer/semver": "3.4.2",
"filp/whoops": "2.15.4",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.13.0",
"michelf/php-smartypants": "1.8.1",
"phpmailer/phpmailer": "6.9.1",
"symfony/polyfill-intl-idn": "1.29.0",
"symfony/polyfill-mbstring": "1.29.0",
"symfony/yaml": "6.4.8"
"symfony/polyfill-intl-idn": "1.30.0",
"symfony/polyfill-mbstring": "1.30.0",
"symfony/yaml": "6.4.11"
},
"replace": {
"symfony/polyfill-php72": "*"
Expand Down
90 changes: 45 additions & 45 deletions composer.lock

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

10 changes: 4 additions & 6 deletions config/api/routes/files.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// routing pattern to match all models with files
$filePattern = '(account/|pages/[^/]+/|site/|users/[^/]+/|)files/(:any)';
$filePattern = '(account/|pages/[^/]+/|site/|users/[^/]+/|)files/(:any)';
$parentPattern = '(account|pages/[^/]+|site|users/[^/]+)/files';

/**
Expand Down Expand Up @@ -47,17 +47,15 @@
// move_uploaded_file() not working with unit test
// @codeCoverageIgnoreStart
return $this->upload(function ($source, $filename) use ($path) {
$props = [
// move the source file from the temp dir
return $this->parent($path)->createFile([
'content' => [
'sort' => $this->requestBody('sort')
],
'source' => $source,
'template' => $this->requestBody('template'),
'filename' => $filename
];

// move the source file from the temp dir
return $this->parent($path)->createFile($props, true);
], true);
});
// @codeCoverageIgnoreEnd
}
Expand Down
6 changes: 4 additions & 2 deletions config/areas/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
use Kirby\Toolkit\I18n;

return function ($kirby) {
$blueprint = $kirby->site()->blueprint();

return [
'breadcrumbLabel' => function () use ($kirby) {
return $kirby->site()->title()->or(I18n::translate('view.site'))->toString();
},
'icon' => 'home',
'label' => $kirby->site()->blueprint()->title() ?? I18n::translate('view.site'),
'icon' => $blueprint->icon() ?? 'home',
'label' => $blueprint->title() ?? I18n::translate('view.site'),
'menu' => true,
'dialogs' => require __DIR__ . '/site/dialogs.php',
'drawers' => require __DIR__ . '/site/drawers.php',
Expand Down
15 changes: 13 additions & 2 deletions config/areas/site/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,23 @@
'page.changeTitle' => [
'pattern' => 'pages/(:any)/changeTitle',
'load' => function (string $id) {
$request = App::instance()->request();
$kirby = App::instance();
$request = $kirby->request();

$page = Find::page($id);
$permissions = $page->permissions();
$select = $request->get('select', 'title');

// build the path prefix
$path = match ($kirby->multilang()) {
true => Str::after($kirby->site()->url(), $kirby->url()) . '/',
false => '/'
};

if ($parent = $page->parent()) {
$path .= $parent->uri() . '/';
}

return [
'component' => 'k-form-dialog',
'props' => [
Expand All @@ -212,7 +223,7 @@
'slug' => Field::slug([
'required' => true,
'preselect' => $select === 'slug',
'path' => $page->parent() ? '/' . $page->parent()->uri() . '/' : '/',
'path' => $path,
'disabled' => $permissions->can('changeSlug') === false,
'wizard' => [
'text' => I18n::translate('page.changeSlug.fromTitle'),
Expand Down
Loading

0 comments on commit d14bc47

Please sign in to comment.