Fixed flex pages search using only folder name [#3316]

This commit is contained in:
Matias Griese
2021-05-27 13:17:24 +03:00
parent 75cef03644
commit e28360f86a
2 changed files with 6 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
* Improve Plugin and Theme initialization to fix PHP8 bug [#3368](https://github.com/getgrav/grav/issues/3368)
* Fixed `pathinfo()` twig filter in PHP7
* Fixed the first visible child page getting ordering number `999999.` [#3365](https://github.com/getgrav/grav/issues/3365)
* Fixed flex pages search using only folder name [#3316](https://github.com/getgrav/grav/issues/3316)
# v1.7.15
## 05/19/2021

View File

@@ -298,7 +298,11 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
$weight = 0;
foreach ($properties as $property) {
$weight += $this->searchNestedProperty($property, $search, $options);
if (strpos($property, '.')) {
$weight += $this->searchNestedProperty($property, $search, $options);
} else {
$weight += $this->searchProperty($property, $search, $options);
}
}
return $weight > 0 ? min($weight, 1) : 0;