Only use pdf export module for pdf format

This commit is contained in:
Sukhwinder Dhillon 2022-05-24 11:25:34 +02:00 committed by Johannes Meyer
parent 5b026f8f26
commit f31291d28e

View file

@ -465,15 +465,15 @@ class Controller extends CompatController
*/
protected function sendAsPdf()
{
if (! Icinga::app()->getModuleManager()->has('pdfexport')) {
throw new ConfigurationError('The pdfexport module is required for exports to PDF');
}
if (version_compare(Version::VERSION, '2.10.0', '>=')) {
parent::sendAsPdf();
return;
}
if (! Icinga::app()->getModuleManager()->has('pdfexport')) {
throw new ConfigurationError('The pdfexport module is required for exports to PDF');
}
putenv('ICINGAWEB_EXPORT_FORMAT=pdf');
Environment::raiseMemoryLimit('512M');
Environment::raiseExecutionTime(300);