Skip to content

Commit 7bcc1cd

Browse files
committed
Revert callsites to PdfExportHook assume use of HookEssentials
fd6a977 introduced HookEssentials to PdfExport ea38305 changed the callsites to use HookEssentials be0a311 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 ea38305
1 parent b759046 commit 7bcc1cd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

library/Icinga/File/Pdf.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Dompdf\Dompdf;
99
use Dompdf\Options;
1010
use Exception;
11+
use Icinga\Application\Hook;
1112
use Icinga\Application\Hook\PdfexportHook;
1213
use Icinga\Application\Icinga;
1314
use Icinga\Exception\ProgrammingError;
@@ -56,7 +57,7 @@ public function renderControllerAction($controller)
5657

5758
$request = $controller->getRequest();
5859

59-
if (PdfexportHook::isRegistered()) {
60+
if (Hook::has('Pdfexport')) {
6061
$pdfexport = PdfexportHook::first();
6162
$pdfexport->streamPdfFromHtml($html, sprintf(
6263
'%s-%s-%d',

library/Icinga/Web/Widget/Tabextension/OutputFormat.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
namespace Icinga\Web\Widget\Tabextension;
77

8-
use Icinga\Application\Hook\PdfexportHook;
98
use Icinga\Application\Platform;
109
use Icinga\Application\Hook;
1110
use Icinga\Web\Url;
@@ -85,7 +84,7 @@ public function getSupportedTypes()
8584
{
8685
$supportedTypes = array();
8786

88-
$pdfexport = PdfexportHook::isRegistered();
87+
$pdfexport = Hook::has('Pdfexport');
8988

9089
if ($pdfexport || Platform::extensionLoaded('gd')) {
9190
$supportedTypes[self::TYPE_PDF] = array(

0 commit comments

Comments
 (0)