summaryrefslogtreecommitdiffstats
path: root/phpMyAdmin-vendor.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-05-09 19:06:50 +0200
committerRemi Collet <fedora@famillecollet.com>2013-05-09 19:06:50 +0200
commit20bfd46944dfc9bdaed76fc6c2512a4655c88d37 (patch)
tree9d51c8a98e48c7042db947cc04ea030d718194e9 /phpMyAdmin-vendor.patch
parent341e41089fc4453b9cc18a87df10f9c5a1477fb5 (diff)
phpMyAdmin: use system tcpdf
Diffstat (limited to 'phpMyAdmin-vendor.patch')
-rw-r--r--phpMyAdmin-vendor.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/phpMyAdmin-vendor.patch b/phpMyAdmin-vendor.patch
new file mode 100644
index 0000000..284e75d
--- /dev/null
+++ b/phpMyAdmin-vendor.patch
@@ -0,0 +1,41 @@
+--- libraries/vendor_config.php~ 2013-05-03 14:16:36.000000000 +0200
++++ libraries/vendor_config.php 2013-05-09 17:29:11.847767792 +0200
+@@ -68,4 +68,9 @@
+ * 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');
+ ?>
+--- libraries/PDF.class.php~ 2013-05-03 14:16:36.000000000 +0200
++++ libraries/PDF.class.php 2013-05-09 17:29:10.904764535 +0200
+@@ -9,7 +9,7 @@
+ exit;
+ }
+
+-require_once './libraries/tcpdf/tcpdf.php';
++require_once TCPDF_INC;
+
+ /**
+ * PDF font to use.
+@@ -45,13 +45,16 @@
+ ) {
+ 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);
+ $this->setFooterFont(array(PMA_PDF_FONT, '', 14));
+ }
+
++ public function empty_string($str) {
++ return (is_null($str) OR (is_string($str) AND (strlen($str) == 0)));
++ }
++
+ /**
+ * This function must be named "Footer" to work with the TCPDF library
+ *