Fix renaming the folder name if the page, in the default language, had a custom slug set in its header

This commit is contained in:
Flavio Copes
2017-01-05 16:08:25 +01:00
parent cc96d160a4
commit 1cd6773ded
2 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
1. [](#bugfix)
* Fixed cross volume file system operations [#635](https://github.com/getgrav/grav/issues/635)
* Fix issue with pages folders validation not accepting uppercase letters
* Fix renaming the folder name if the page, in the default language, had a custom slug set in its header
# v1.1.12
## 12/26/2016

View File

@@ -1458,8 +1458,11 @@ class Page
{
if ($var !== null) {
$order = !empty($var) ? sprintf('%02d.', (int)$var) : '';
$this->folder($order . $this->slug());
$this->folder($order . preg_replace(PAGE_ORDER_PREFIX_REGEX, '', $this->folder));
return $order;
}
preg_match(PAGE_ORDER_PREFIX_REGEX, $this->folder, $order);
return isset($order[0]) ? $order[0] : false;