Skip to content

Commit

Permalink
StateBadges: Don't use the legacy filter implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Jun 15, 2023
1 parent 2cba018 commit a0bbf5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Common/StateBadges.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ipl\Web\Common;

use Icinga\Data\Filter\Filter;
use ipl\Html\BaseHtmlElement;
use ipl\Html\Html;
use ipl\Stdlib\BaseFilter;
Expand Down Expand Up @@ -115,7 +114,9 @@ public function createLink($content, array $params = null): Link
}

if ($this->hasBaseFilter()) {
$url->addFilter(Filter::fromQueryString(QueryString::render($this->getBaseFilter())));
$urlParams = $url->getParams()->toArray(false);
$url->setQueryString(QueryString::render($this->getBaseFilter()))
->addParams($urlParams);
}

return new Link($content, $url);
Expand Down

0 comments on commit a0bbf5a

Please sign in to comment.