diff --git a/ChangeLog b/ChangeLog index 361b170e9a..c744491bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ phpMyAdmin - ChangeLog - bug #3904 Browsing an empty table should not display its Structure - bug #3908 Calendar widget improperly redirects to home - bug #3916 [interface] Missing scrollbar (original theme) ++ [vendor] add tcpdf path to vendor_config.php +- bug fix compat with tcpdf >= 6.0 (tested with 6.0.012) 4.0.0.0 (2013-05-03) + Patch #3481047 for rfe #3480477 Insert as new row enhancement diff --git a/libraries/PDF.class.php b/libraries/PDF.class.php index 66e05a300e..fa4b48ac02 100644 --- a/libraries/PDF.class.php +++ b/libraries/PDF.class.php @@ -9,7 +9,7 @@ if (! defined('PHPMYADMIN')) { exit; } -require_once './libraries/tcpdf/tcpdf.php'; +require_once TCPDF_INC; /** * PDF font to use. @@ -45,7 +45,6 @@ class PMA_PDF extends TCPDF ) { parent::__construct(); $this->SetAuthor('phpMyAdmin ' . PMA_VERSION); - $this->AliasNbPages(); $this->AddFont('DejaVuSans', '', 'dejavusans.php'); $this->AddFont('DejaVuSans', 'B', 'dejavusansb.php'); $this->SetFont(PMA_PDF_FONT, '', 14); @@ -72,6 +71,17 @@ class PMA_PDF extends TCPDF } } + /** + * Function to test an empty string (was in tcpdf < 6.0) + * + * @param string $str to test + * + * @return boolean + */ + public function empty_string($str) { + return (is_null($str) OR (is_string($str) AND (strlen($str) == 0))); + } + /** * Function to set alias which will be expanded on page rendering. * diff --git a/libraries/vendor_config.php b/libraries/vendor_config.php index 0a09a996c6..92356f3aef 100644 --- a/libraries/vendor_config.php +++ b/libraries/vendor_config.php @@ -68,4 +68,9 @@ define('VERSION_CHECK_DEFAULT', true); * eg. /usr/share/php/gettext/gettext.inc. */ define('GETTEXT_INC', './libraries/php-gettext/gettext.inc'); +/** + * Path to tcpdf.php file. Useful when you want to use system tcpdf, + * eg. /usr/share/php/tcpdf/tcpdf.php. + */ +define('TCPDF_INC', './libraries/tcpdf/tcpdf.php'); ?>