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:
Johannes Meyer 2020-01-14 11:01:53 +01:00
parent 29aaa363b4
commit 6a8f17faf2

View File

@ -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(