summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22e3da6)
raw | patch | inline | side by side (parent: 22e3da6)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Sep 2009 13:45:32 +0000 (13:45 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Sep 2009 13:45:32 +0000 (13:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14270 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/exporter/class_pdfExporter.inc | patch | blob | history | |
gosa-core/include/php_setup.inc | patch | blob | history |
diff --git a/gosa-core/include/exporter/class_pdfExporter.inc b/gosa-core/include/exporter/class_pdfExporter.inc
index 93b1127e87ae349da00b216752c4a45d6fa1177e..f1c5f8918d36f4fa62d23a7e4b360f56f5fd38c5 100644 (file)
<?php
-// Try to load PDF library
-define('FPDF_FONTPATH', '/usr/share/php/fpdf/font/');
-@include('fpdf/fpdf.php');
-
// Load supporter class only if FPDF is loaded
-$classes= get_declared_classes();
-if(in_array('FPDF', $classes)) {
+if(class_exists('FPDF')) {
include('class_PDF.inc');
}
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) {
index 920a7fe5b8cf006609a0776adefe9a92a551230a..9ba0e4dacaa1140070b794bccf403d8652e45344 100644 (file)
$smarty->caching= false;
$smarty->php_handling= SMARTY_PHP_REMOVE;
+// Try to load PDF library
+define('FPDF_FONTPATH', '/usr/share/php/fpdf/font/');
+@include('fpdf/fpdf.php');
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>