From 6a8f17faf2be7743e495435e582dec93bbe8aad2 Mon Sep 17 00:00:00 2001
From: Johannes Meyer <johannes.meyer@icinga.com>
Date: Tue, 14 Jan 2020 11:01:53 +0100
Subject: [PATCH] OutputFormat: Just provide the pdf export if there's a hook
 available

Calling `isSupported()` is bad here since there may be IO involved.
---
 library/Icinga/Web/Widget/Tabextension/OutputFormat.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php
index ea33485e9..d5d83aff5 100644
--- a/library/Icinga/Web/Widget/Tabextension/OutputFormat.php
+++ b/library/Icinga/Web/Widget/Tabextension/OutputFormat.php
@@ -82,11 +82,7 @@ class OutputFormat implements Tabextension
     {
         $supportedTypes = array();
 
-        $pdfexport = false;
-
-        if (Hook::has('Pdfexport')) {
-            $pdfexport = Hook::first('Pdfexport')->isSupported();
-        }
+        $pdfexport = Hook::has('Pdfexport');
 
         if ($pdfexport || Platform::extensionLoaded('gd')) {
             $supportedTypes[self::TYPE_PDF] = array(