DashboardCommand: Don't swallow custom dashboards

This commit is contained in:
Johannes Meyer 2019-08-02 14:14:28 +02:00
parent 49e84f2ad0
commit 53598ecd18
1 changed files with 5 additions and 4 deletions

View File

@ -76,10 +76,7 @@ class DashboardCommand extends Command
$dashletTitle = null;
}
if (isset($options['disabled']) && mt($module->getName(), $paneName) !== $paneTitle) {
// `disabled` is checked because if it's a module's pane that's the only reason
// why it's in there. If a user utilized the same label though for a custom pane,
// it remains as is.
if (mt($module->getName(), $paneName) !== $paneTitle) {
continue;
}
@ -91,6 +88,10 @@ class DashboardCommand extends Command
break;
}
}
if ($dashletName === null) {
$dashletName = $dashletTitle;
}
}
$newSection = $paneName . ($dashletName ? '.' . $dashletName : '');