Skip to content
Snippets Groups Projects
Commit be8b9d40 authored by codebymikey's avatar codebymikey Committed by Dieter Holvoet
Browse files

Issue #3472581 by codebymikey, kurttrowbridge, dieterholvoet:...

Issue #3472581 by codebymikey, kurttrowbridge, dieterholvoet: DashboardController keeps adding master dashboards indefinitely
parent 8e7c3d12
No related branches found
No related tags found
2 merge requests!51Issue #3411500 by DieterHolvoet, lukas.fischer: Font sizes are too small in...,!48Issue #3472581: DashboardController keeps adding master dashboards indefinitely
......@@ -94,7 +94,7 @@ class DashboardController extends ControllerBase
// Ensure the "master" dashboard tab is enabled in the tabs configuration.
$tabs_config = $config_factory->getEditable('content_planner.dashboard_tabs_settings');
$tabs = $tabs_config->get('dashboards') ?: [];
if (!array_key_exists('master', array_column($tabs, 'dashboard_id'))) {
if (!in_array('master', array_column($tabs, 'dashboard_id'), TRUE)) {
$tabs[] = ['dashboard_id' => 'master', 'enabled' => TRUE, 'weight' => -10];
$tabs_config->set('dashboards', $tabs)->save();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment