Fixed wrong values in Admin pages list [#3214]

This commit is contained in:
Matias Griese
2021-02-08 18:46:47 +02:00
parent 99c870c5cc
commit 6b25a9f00c
2 changed files with 5 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
* Fixed lowering uppercase characters in usernames when saving from frontend [#2565](https://github.com/getgrav/grav/pull/2565)
* Fixed save error when editing accounts that have been created with capital letters in their username [#3211](https://github.com/getgrav/grav/issues/3211)
* Fixed renaming flex objects key when using file storage
* Fixed wrong values in Admin pages list [#3214](https://github.com/getgrav/grav/issues/3214)
# v1.7.5
## 02/01/2021

View File

@@ -448,6 +448,10 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
'has-children' => $child_count > 0
];
} else {
$lang = $child->findTranslation($language) ?? 'n/a';
/** @var PageObject $child */
$child = $child->getTranslation($language) ?? $child;
// TODO: all these features are independent from each other, we cannot just have one icon/color to catch all.
// TODO: maybe icon by home/modular/page/folder (or even from blueprints) and color by visibility etc..
if ($child->home()) {
@@ -467,9 +471,6 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
$child->visible() ? 'visible' : 'non-visible',
$child->routable() ? 'routable' : 'non-routable'
];
$lang = $child->findTranslation($language) ?? 'n/a';
/** @var PageObject $child */
$child = $child->getTranslation($language) ?? $child;
$extras = [
'template' => $child->template(),
'lang' => $lang ?: null,