fix compat with tcpdf >= 6.0 (tested with 6.0.012)

This commit is contained in:
Remi Collet 2013-05-09 18:29:28 +02:00 committed by Marc Delisle
parent 73e75d54bf
commit 313d63ad8f

View File

@ -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.
*