Skip to content

Commit

Permalink
Merge branch 'release/1.7.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Apr 23, 2021
2 parents b9ab491 + ed7e514 commit 2ed4511
Show file tree
Hide file tree
Showing 16 changed files with 319 additions and 126 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# v1.7.13
## 04/23/2021

1. [](#new)
* Added support for getting translated collection of Flex Pages using `$collection->withTranslated('de')`
1. [](#improved)
* Moved `gregwar/Image` and `gregwar/Cache` in-house to official `getgrav/Image` and `getgrav/Cache` packagist packages. This will help environments with very strict proxy setups that don't allow VCS setup. [#3289](https://github.com/getgrav/grav/issues/3289)
* Improved XSS Invalid Protocol detection regex [#3298](https://github.com/getgrav/grav/issues/3298)
* Added support for user provided folder in Flex `$page->copy()`
1. [](#bugfix)
* Fixed `The "Grav/Common/Twig/TwigExtension" extension is not enabled` when using markdown twig tag [#3317](https://github.com/getgrav/grav/issues/3317)
* Fixed text field maxlength validation newline issue [#3324](https://github.com/getgrav/grav/issues/3324)
* Fixed a bug in Flex Object `refresh()` method

# v1.7.12
## 04/15/2021

Expand Down
20 changes: 3 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"filp/whoops": "~2.9",
"matthiasmullie/minify": "^1.3",
"monolog/monolog": "~1.25",
"gregwar/image": "dev-php8",
"gregwar/cache": "dev-php8",
"getgrav/image": "^3.0",
"getgrav/cache": "^2.0",
"donatj/phpuseragentparser": "~1.1",
"pimple/pimple": "~3.3.0",
"rockettheme/toolbox": "~1.5",
Expand All @@ -67,7 +67,7 @@
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpunit/php-code-coverage": "~9.2",
"victorjonsson/markdowndocs": "dev-master",
"getgrav/markdowndocs": "^2.0",
"codeception/module-asserts": "^1.3",
"codeception/module-phpbrowser": "^1.0",
"symfony/service-contracts": "*"
Expand All @@ -91,20 +91,6 @@
"php": "7.3.6"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator"
},
{
"type": "vcs",
"url": "https://github.com/getgrav/Cache"
},
{
"type": "vcs",
"url": "https://github.com/getgrav/Image"
}
],
"autoload": {
"psr-4": {
"Grav\\": "system/src/Grav"
Expand Down
161 changes: 87 additions & 74 deletions composer.lock

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

2 changes: 1 addition & 1 deletion system/blueprints/pages/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ form:
underline: true

folder:
type: text
type: folder-slug
label: PLUGIN_ADMIN.FOLDER_NAME
validate:
rule: slug
Expand Down
2 changes: 1 addition & 1 deletion system/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.7.12');
define('GRAV_VERSION', '1.7.13');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false);

Expand Down
3 changes: 2 additions & 1 deletion system/src/Grav/Common/Data/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public static function typeText($value, array $params, array $field)
$value = trim($value);
}

$value = preg_replace("/\r\n|\r/um", "\n", $value);
$len = mb_strlen($value);

$min = (int)($params['min'] ?? 0);
Expand Down Expand Up @@ -280,7 +281,7 @@ protected static function filterText($value, array $params, array $field)
$value = trim($value);
}

return $value;
return preg_replace("/\r\n|\r/um", "\n", $value);
}

/**
Expand Down
10 changes: 10 additions & 0 deletions system/src/Grav/Common/Flex/Types/Pages/PageCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,16 @@ public function withTranslation(bool $bool = true, string $languageCode = null,
return $bool ? $this->select($list) : $this->unselect($list);
}

/**
* @param string|null $languageCode
* @param bool|null $fallback
* @return PageIndex
*/
public function withTranslated(string $languageCode = null, bool $fallback = null)
{
return $this->getIndex()->withTranslated($languageCode, $fallback);
}

/**
* Filter pages by given filters.
*
Expand Down
Loading

0 comments on commit 2ed4511

Please sign in to comment.