mirror of
https://github.com/getgrav/grav.git
synced 2026-02-28 01:21:30 +01:00
Fixed flex pages search using only folder name [#3316]
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user