From 7ae3edc9a0f09e2f70c4d2a425e4a77fcb642de5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 9 May 2013 18:24:06 +0200 Subject: [PATCH 1/4] add tcpdf path to vendor_config.php --- libraries/PDF.class.php | 2 +- libraries/vendor_config.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/PDF.class.php b/libraries/PDF.class.php index 66e05a300e..d11a9d4e9b 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. 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'); ?> From 73e75d54bf8682528eb76598dadb7993589eb639 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 9 May 2013 14:48:14 -0400 Subject: [PATCH 2/4] ChangeLog entry for "add tcpdf path to vendor_config.php" --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 361b170e9a..4f352b9091 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ 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 4.0.0.0 (2013-05-03) + Patch #3481047 for rfe #3480477 Insert as new row enhancement From 313d63ad8f8d53d953df22a97f435964841cddf0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 9 May 2013 18:29:28 +0200 Subject: [PATCH 3/4] fix compat with tcpdf >= 6.0 (tested with 6.0.012) --- libraries/PDF.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libraries/PDF.class.php b/libraries/PDF.class.php index d11a9d4e9b..fa4b48ac02 100644 --- a/libraries/PDF.class.php +++ b/libraries/PDF.class.php @@ -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. * From d8d3e2823aa8ceff6b5a61ee2ddf640892e41f64 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 9 May 2013 14:51:17 -0400 Subject: [PATCH 4/4] ChangeLog entry for "fix compat with tcpdf >= 6.0 (tested with 6.0.012)" --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 4f352b9091..c744491bfe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ phpMyAdmin - ChangeLog - 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