mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
OutputFormat: Just provide the pdf export if there's a hook available
Calling `isSupported()` is bad here since there may be IO involved.
This commit is contained in:
parent
29aaa363b4
commit
6a8f17faf2
@ -82,11 +82,7 @@ class OutputFormat implements Tabextension
|
|||||||
{
|
{
|
||||||
$supportedTypes = array();
|
$supportedTypes = array();
|
||||||
|
|
||||||
$pdfexport = false;
|
$pdfexport = Hook::has('Pdfexport');
|
||||||
|
|
||||||
if (Hook::has('Pdfexport')) {
|
|
||||||
$pdfexport = Hook::first('Pdfexport')->isSupported();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($pdfexport || Platform::extensionLoaded('gd')) {
|
if ($pdfexport || Platform::extensionLoaded('gd')) {
|
||||||
$supportedTypes[self::TYPE_PDF] = array(
|
$supportedTypes[self::TYPE_PDF] = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user