diff --git a/gosa-core/include/exporter/class_pdfExporter.inc b/gosa-core/include/exporter/class_pdfExporter.inc
index 2fdd05c40c2e36d7eecc891ac2c9ee5ebbb1046b..d1c836e79e0296e0db033ac865126d856744bd59 100644 (file)
<?php
-
// Try to load PDF library
-define('FPDF_FONTPATH', '/usr/share/php/fpdf/font/');
-include('fpdf/fpdf.php');
+@include_once('fpdf/fpdf.php');
// Load supporter class only if FPDF is loaded
$classes= get_declared_classes();
var $result;
function pdfExporter($headline, $header, $entries, $columns= array()) {
+ // Bail out if no FPDF available
+ if(!class_exists('FPDF')) {
+ die(_("No PDF export possible: there is no FPDF library installed."));
+ }
+
// If no preset, render all columns
if (!count($columns)) {
foreach ($header as $index => $dummy) {