diff --git a/gosa-core/include/exporter/class_pdfExporter.inc b/gosa-core/include/exporter/class_pdfExporter.inc
index 93b1127e87ae349da00b216752c4a45d6fa1177e..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) {