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(