mirror of
https://github.com/getgrav/grav.git
synced 2026-02-04 13:50:13 +01:00
Fixed sorting by groups in Flex Users
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
* Fixed bug in collections where filter `type: false` did not work
|
||||
* Fixed `print_r()` in twig
|
||||
* Fixed sorting by groups in `Flex Users`
|
||||
* Changing `Flex Page` template causes the other language versions of that page to lose their content [admin#1958](https://github.com/getgrav/grav-plugin-admin/issues/1958)
|
||||
|
||||
# v1.7.0-rc.17
|
||||
## 10/07/2020
|
||||
|
||||
@@ -55,8 +55,11 @@ trait PageTranslateTrait
|
||||
} elseif ('' === $code) {
|
||||
$object = $this->getLanguage() ? $this->getFlexDirectory()->getObject($this->getMasterKey(), 'storage_key') : $this;
|
||||
} else {
|
||||
$key = $this->getStorageKey() . '|.' . $code;
|
||||
$meta = ['storage_key' => $key, 'lang' => $code] + $this->getMetaData();
|
||||
$meta = $this->getMetaData();
|
||||
$meta['template'] = $this->getLanguageTemplates()[$code] ?? $meta['template'];
|
||||
$key = $this->getStorageKey() . '|' . $meta['template'] . '.' . $code;
|
||||
$meta['storage_key'] = $key;
|
||||
$meta['lang'] = $code;
|
||||
$object = $this->getFlexDirectory()->loadObjects([$key => $meta])[$key] ?? null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user