Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/forms/PerfdataGraphsConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function listBackends(): array

$enum = array();
foreach ($hooks as $hook) {
$enum[get_class($hook)] = $hook->getName();
$enum[mb_strtolower($hook->getName())] = $hook->getName();
}
asort($enum);

Expand Down Expand Up @@ -82,7 +82,7 @@ public function createElements(array $formData)
[
'label' => $this->translate('Default Data Backend'),
'description' => $this->translate('Default backend for the performance data graphs. With only one backend is installed, it will be used by default.'),
'multiOptions' => array_merge($choose, array_combine($backends, $backends)),
'multiOptions' => array_merge($choose, $backends),
'class' => 'autosubmit',
]
);
Expand Down
2 changes: 1 addition & 1 deletion library/Perfdatagraphs/Common/ModuleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function getHook(Config $moduleConfig = null): ?PerfdataSourceHook
// See if we can find the configured hook in the available hooks
// If not then we return the first we find, which could still be none
foreach ($hooks as $hook) {
if ($configuredHookName === $hook->getName()) {
if (mb_strtolower($configuredHookName) === mb_strtolower($hook->getName())) {
return $hook;
}
}
Expand Down