Skip to content

Commit

Permalink
Fix incorrect url migrations (#995)
Browse files Browse the repository at this point in the history
fixes #953
  • Loading branch information
nilmerg authored Mar 22, 2024
2 parents 72c5675 + 6cafeed commit e2368de
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions library/Icingadb/Compat/UrlMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,14 @@ protected function rewrite(Filter\Rule $filter, array $legacyColumns)
case $exprRule === self::LOWER_EXPR:
$filter->setValue(strtolower($filter->getValue()));
break;
case is_array($exprRule) && isset($exprRule[$filter->getValue()]):
$filter->setValue($exprRule[$filter->getValue()]);
break;
case is_array($exprRule):
if (isset($exprRule[$filter->getValue()])) {
$filter->setValue($exprRule[$filter->getValue()]);

break;
}

return false;
default:
$filter->setValue($exprRule);
}
Expand Down Expand Up @@ -290,6 +295,8 @@ protected static function commonParameters(): array
},
'dir' => self::DROP,
'limit' => self::USE_EXPR,
'addFilter' => self::DROP,
'modifyFilter' => self::DROP,
'showCompact' => self::USE_EXPR,
'showFullscreen' => self::USE_EXPR,
'view' => function ($value) {
Expand Down

0 comments on commit e2368de

Please sign in to comment.