Merge branch 'main' into develop
commit
72d821ad05
|
@ -56,7 +56,7 @@ For installation via docker, refer to the [cerebrate-docker](https://github.com/
|
||||||
~~~~
|
~~~~
|
||||||
The software is released under the AGPLv3.
|
The software is released under the AGPLv3.
|
||||||
|
|
||||||
Copyright (C) 2019, 2021 Andras Iklody
|
Copyright (C) 2019-2024 Andras Iklody
|
||||||
Copyright (C) 2020-2021 Sami Mokaddem
|
Copyright (C) 2020-2024 Sami Mokaddem
|
||||||
Copyright (C) CIRCL - Computer Incident Response Center Luxembourg
|
Copyright (C) CIRCL - Computer Incident Response Center Luxembourg
|
||||||
~~~~
|
~~~~
|
||||||
|
|
|
@ -74,8 +74,13 @@ class NavigationComponent extends Component
|
||||||
$userSettingTable = TableRegistry::getTableLocator()->get('UserSettings');
|
$userSettingTable = TableRegistry::getTableLocator()->get('UserSettings');
|
||||||
$setting = $userSettingTable->getSettingByName($this->request->getAttribute('identity'), 'ui.bookmarks');
|
$setting = $userSettingTable->getSettingByName($this->request->getAttribute('identity'), 'ui.bookmarks');
|
||||||
$bookmarks = is_null($setting) ? [] : json_decode($setting->value, true);
|
$bookmarks = is_null($setting) ? [] : json_decode($setting->value, true);
|
||||||
|
if (empty($bookmarks)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$links = array_map(function($bookmark) {
|
$links = array_map(function($bookmark) {
|
||||||
|
if (!isset($bookmark['name']) || !isset($bookmark['label']) || !isset($bookmark['url'])) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
return [
|
return [
|
||||||
'name' => $bookmark['name'],
|
'name' => $bookmark['name'],
|
||||||
'label' => $bookmark['label'],
|
'label' => $bookmark['label'],
|
||||||
|
|
Loading…
Reference in New Issue