This commit is contained in:
wangjinlei
2024-07-17 09:23:45 +08:00
parent edf9deeb1a
commit 881ac3e056
1001 changed files with 41032 additions and 5452 deletions

View File

@@ -3,11 +3,11 @@
// File name : tcpdf_static.php
// Version : 1.1.4
// Begin : 2002-08-03
// Last Update : 2019-11-01
// Last Update : 2023-09-06
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
// Copyright (C) 2002-2021 Nicola Asuni - Tecnick.com LTD
// Copyright (C) 2002-2023 Nicola Asuni - Tecnick.com LTD
//
// This file is part of TCPDF software library.
//
@@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.4.4';
private static $tcpdf_version = '6.7.5';
/**
* String alias for total number of pages.
@@ -128,39 +128,6 @@ class TCPDF_STATIC {
return "\x54\x43\x50\x44\x46\x20".self::getTCPDFVersion()."\x20\x28\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x74\x63\x70\x64\x66\x2e\x6f\x72\x67\x29";
}
/**
* Sets the current active configuration setting of magic_quotes_runtime (if the set_magic_quotes_runtime function exist)
* @param boolean $mqr FALSE for off, TRUE for on.
* @since 4.6.025 (2009-08-17)
* @public static
*/
public static function set_mqr($mqr) {
if (!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
@set_magic_quotes_runtime($mqr);
}
}
/**
* Gets the current active configuration setting of magic_quotes_runtime (if the get_magic_quotes_runtime function exist)
* @return int Returns 0 if magic quotes runtime is off or get_magic_quotes_runtime doesn't exist, 1 otherwise.
* @since 4.6.025 (2009-08-17)
* @public static
*/
public static function get_mqr() {
if (!defined('PHP_VERSION_ID')) {
$version = PHP_VERSION;
define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[2] * 100) + $version[4]));
}
if (PHP_VERSION_ID < 50300) {
return @get_magic_quotes_runtime();
}
return 0;
}
/**
* Check if the URL exist.
* @param string $url URL to check.
@@ -319,7 +286,7 @@ class TCPDF_STATIC {
*/
public static function _escapeXML($str) {
$replaceTable = array("\0" => '', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;');
$str = strtr($str, $replaceTable);
$str = strtr($str === null ? '' : $str, $replaceTable);
return $str;
}
@@ -852,9 +819,7 @@ class TCPDF_STATIC {
if (isset($prop['charLimit'])) {
$opt['maxlen'] = intval($prop['charLimit']);
}
if (!isset($ff)) {
$ff = 0; // default value
}
$ff = 0;
// readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it.
if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) {
$ff += 1 << 0;
@@ -1811,7 +1776,11 @@ class TCPDF_STATIC {
$flags = $flags === null ? 0 : $flags;
// the bug only happens on PHP 5.2 when using the u modifier
if ((strpos($modifiers, 'u') === FALSE) OR (count(preg_split('//u', "\n\t", -1, PREG_SPLIT_NO_EMPTY)) == 2)) {
return preg_split($pattern.$modifiers, $subject, $limit, $flags);
$ret = preg_split($pattern.$modifiers, $subject, $limit, $flags);
if ($ret === false) {
return array();
}
return is_array($ret) ? $ret : array();
}
// preg_split is bugged - try alternative solution
$ret = array();
@@ -1887,7 +1856,8 @@ class TCPDF_STATIC {
if (isset($urlData['query']) && $urlData['query']) {
$urlQueryData = array();
parse_str(urldecode($urlData['query']), $urlQueryData);
$updatedUrl = $urlData['scheme'] . '://' . $urlData['host'] . $urlData['path'] . '?' . http_build_query($urlQueryData);
$port = isset($urlData['port']) ? ':'.$urlData['port'] : '';
$updatedUrl = $urlData['scheme'].'://'.$urlData['host'].$port.$urlData['path'].'?'.http_build_query($urlQueryData);
} else {
$updatedUrl = $url;
}
@@ -2154,7 +2124,7 @@ class TCPDF_STATIC {
* Array of page formats
* measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4)
* @public static
*
*
* @var array<string,float[]>
*/
public static $page_formats = array(