Skip to content

Commit

Permalink
Merge pull request #5958 from getkirby/release/3.9.8
Browse files Browse the repository at this point in the history
3.9.8
  • Loading branch information
bastianallgeier authored Nov 14, 2023
2 parents 8bb22df + 179b604 commit 1045a79
Show file tree
Hide file tree
Showing 89 changed files with 2,271 additions and 964 deletions.
7 changes: 4 additions & 3 deletions 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.7",
"version": "3.9.8",
"keywords": [
"kirby",
"cms",
Expand Down Expand Up @@ -38,14 +38,14 @@
"ext-openssl": "*",
"claviska/simpleimage": "4.0.6",
"composer/semver": "3.4.0",
"filp/whoops": "2.15.3",
"filp/whoops": "2.15.4",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.12.0",
"michelf/php-smartypants": "1.8.1",
"phpmailer/phpmailer": "6.8.1",
"symfony/polyfill-intl-idn": "1.28.0",
"symfony/polyfill-mbstring": "1.28.0",
"symfony/yaml": "5.4.23"
"symfony/yaml": "5.4.30"
},
"replace": {
"symfony/polyfill-php72": "*"
Expand All @@ -57,6 +57,7 @@
"ext-fileinfo": "Improved mime type detection for files",
"ext-intl": "Improved i18n number formatting",
"ext-memcached": "Support for the Memcached cache driver",
"ext-sodium": "Support for the crypto class and more robust session handling",
"ext-zip": "Support for ZIP archive file functions",
"ext-zlib": "Sanitization and validation for svgz files"
},
Expand Down
28 changes: 14 additions & 14 deletions composer.lock

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

24 changes: 22 additions & 2 deletions config/areas/site/dialogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,26 @@
];
}

$slugAppendix = Str::slug(I18n::translate('page.duplicate.appendix'));
$titleAppendix = I18n::translate('page.duplicate.appendix');

// if the item to be duplicated already exists
// add a suffix at the end of slug and title
$duplicateSlug = $page->slug() . '-' . $slugAppendix;
$siblingKeys = $page->parentModel()->childrenAndDrafts()->pluck('uid');

if (in_array($duplicateSlug, $siblingKeys) === true) {
$suffixCounter = 2;
$newSlug = $duplicateSlug . $suffixCounter;

while (in_array($newSlug, $siblingKeys) === true) {
$newSlug = $duplicateSlug . ++$suffixCounter;
}

$slugAppendix .= $suffixCounter;
$titleAppendix .= ' ' . $suffixCounter;
}

return [
'component' => 'k-form-dialog',
'props' => [
Expand All @@ -487,8 +507,8 @@
'value' => [
'children' => false,
'files' => false,
'slug' => $page->slug() . '-' . Str::slug(I18n::translate('page.duplicate.appendix')),
'title' => $page->title() . ' ' . I18n::translate('page.duplicate.appendix')
'slug' => $page->slug() . '-' . $slugAppendix,
'title' => $page->title() . ' ' . $titleAppendix
]
]
];
Expand Down
4 changes: 2 additions & 2 deletions config/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
}

$query = Str::lower($query);
$preg = '!(' . implode('|', $words) . ')!i';
$preg = '!(' . implode('|', $words) . ')!iu';
$scores = [];

$results = $collection->filter(function ($item) use ($query, $exact, $preg, $options, &$scores) {
Expand Down Expand Up @@ -236,7 +236,7 @@
$scoring['hits'] += 1;

// check for exact query matches
} elseif ($matches = preg_match_all('!' . $exact . '!i', $value, $r)) {
} elseif ($matches = preg_match_all('!' . $exact . '!ui', $value, $r)) {
$scoring['score'] += 2 * $score;
$scoring['hits'] += $matches;
}
Expand Down
2 changes: 1 addition & 1 deletion config/fields/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
'key' => 'validation.date.between',
'data' => [
'min' => $min->format($format),
'max' => $min->format($format)
'max' => $max->format($format)
]
]);
} elseif ($min && $value->isMin($min) === false) {
Expand Down
Loading

0 comments on commit 1045a79

Please sign in to comment.