From 7bcc1cdaeb33747a4ad38c0d289de23477b92a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Rie=C3=9F?= Date: Thu, 25 Jun 2026 11:54:15 +0200 Subject: [PATCH] Revert callsites to PdfExportHook assume use of HookEssentials fd6a977ee introduced HookEssentials to PdfExport ea3830516 changed the callsites to use HookEssentials be0a311a7 reverted the change to PdfExport to stay compatible with the original implementation but failed to remove the callsites This commit reverts the changes to the call sites made in ea3830516 --- library/Icinga/File/Pdf.php | 3 ++- library/Icinga/Web/Widget/Tabextension/OutputFormat.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/File/Pdf.php b/library/Icinga/File/Pdf.php index 3212cddc44..78f3db8640 100644 --- a/library/Icinga/File/Pdf.php +++ b/library/Icinga/File/Pdf.php @@ -8,6 +8,7 @@ use Dompdf\Dompdf; use Dompdf\Options; use Exception; +use Icinga\Application\Hook; use Icinga\Application\Hook\PdfexportHook; use Icinga\Application\Icinga; use Icinga\Exception\ProgrammingError; @@ -56,7 +57,7 @@ public function renderControllerAction($controller) $request = $controller->getRequest(); - if (PdfexportHook::isRegistered()) { + if (Hook::has('Pdfexport')) { $pdfexport = PdfexportHook::first(); $pdfexport->streamPdfFromHtml($html, sprintf( '%s-%s-%d', diff --git a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php index 729d77cd1e..7fd2802e97 100644 --- a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php +++ b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php @@ -5,7 +5,6 @@ namespace Icinga\Web\Widget\Tabextension; -use Icinga\Application\Hook\PdfexportHook; use Icinga\Application\Platform; use Icinga\Application\Hook; use Icinga\Web\Url; @@ -85,7 +84,7 @@ public function getSupportedTypes() { $supportedTypes = array(); - $pdfexport = PdfexportHook::isRegistered(); + $pdfexport = Hook::has('Pdfexport'); if ($pdfexport || Platform::extensionLoaded('gd')) { $supportedTypes[self::TYPE_PDF] = array(