From 86a0c1e544be84f855435f99c6af812a2880f261 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 25 Oct 2022 09:29:10 +0200 Subject: [PATCH 1/2] CommentDetail: Build the remove URL in a more standardized way --- library/Icingadb/Widget/Detail/CommentDetail.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icingadb/Widget/Detail/CommentDetail.php b/library/Icingadb/Widget/Detail/CommentDetail.php index cf14e6aa..eb13523d 100644 --- a/library/Icingadb/Widget/Detail/CommentDetail.php +++ b/library/Icingadb/Widget/Detail/CommentDetail.php @@ -11,6 +11,8 @@ use Icinga\Module\Icingadb\Common\TicketLinks; use Icinga\Module\Icingadb\Model\Comment; use Icinga\Module\Icingadb\Widget\MarkdownText; use Icinga\Module\Icingadb\Forms\Command\Object\DeleteCommentForm; +use ipl\Stdlib\Filter; +use ipl\Web\Filter\QueryString; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\StateBall; use ipl\Web\Widget\TimeUntil; @@ -108,7 +110,7 @@ class CommentDetail extends BaseHtmlElement } $action = Links::commentsDelete(); - $action->setParam('name', $this->comment->name); + $action->setQueryString(QueryString::render(Filter::equal('name', $this->comment->name))); return (new DeleteCommentForm()) ->setObjects([$this->comment]) From c0e8f330275ee43340ccae047dc04b5bd2dba09b Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 25 Oct 2022 09:36:46 +0200 Subject: [PATCH 2/2] DowntimeDetail: Build the remove URL in a more standardized way --- library/Icingadb/Widget/Detail/DowntimeDetail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Widget/Detail/DowntimeDetail.php b/library/Icingadb/Widget/Detail/DowntimeDetail.php index 4ca447a8..fbeb0692 100644 --- a/library/Icingadb/Widget/Detail/DowntimeDetail.php +++ b/library/Icingadb/Widget/Detail/DowntimeDetail.php @@ -54,7 +54,7 @@ class DowntimeDetail extends BaseHtmlElement protected function createCancelDowntimeForm() { $action = Links::downtimesDelete(); - $action->setParam('name', $this->downtime->name); + $action->setQueryString(QueryString::render(Filter::equal('name', $this->downtime->name))); return (new DeleteDowntimeForm()) ->setObjects([$this->downtime])