Merge pull request #4049 from Icinga/fix/pdfexport-hooks-may-cause-bad-loading-times
Fix pdfexport hooks may cause bad loading times
This commit is contained in:
commit
05135e716e
|
@ -75,17 +75,14 @@ class Pdf
|
|||
|
||||
if (Hook::has('Pdfexport')) {
|
||||
$pdfexport = Hook::first('Pdfexport');
|
||||
$pdfexport->streamPdfFromHtml($html, sprintf(
|
||||
'%s-%s-%d',
|
||||
$request->getControllerName(),
|
||||
$request->getActionName(),
|
||||
time()
|
||||
));
|
||||
|
||||
if ($pdfexport->isSupported()) {
|
||||
$pdfexport->streamPdfFromHtml($html, sprintf(
|
||||
'%s-%s-%d',
|
||||
$request->getControllerName(),
|
||||
$request->getActionName(),
|
||||
time()
|
||||
));
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$options = new Options();
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue