diff --git a/composer.json b/composer.json
index cfbe5c3d31..a312e0af49 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"ext-json": "*",
"ext-mysqli": "*",
"ext-soap": "*",
- "combodo/tcpdf": "6.3.2",
+ "combodo/tcpdf": "6.3.4",
"nikic/php-parser": "^3.1",
"pear/archive_tar": "1.4.9",
"pelago/emogrifier": "2.1.0",
diff --git a/composer.lock b/composer.lock
index 75e0c9ae59..40179fbc22 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "3e413c47265b246174add07c2c91b5e9",
+ "content-hash": "b29eb2767d269b9ec2cf4d148dc083bc",
"packages": [
{
"name": "combodo/tcpdf",
- "version": "6.3.2",
+ "version": "6.3.4",
"source": {
"type": "git",
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
- "reference": "2723050de47c8cbd78293656d896c0000442e23a"
+ "reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/2723050de47c8cbd78293656d896c0000442e23a",
- "reference": "2723050de47c8cbd78293656d896c0000442e23a",
+ "url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
+ "reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
"shasum": ""
},
"require": {
@@ -49,9 +49,14 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL-3.0"
+ "LGPL-3.0-only"
],
"authors": [
+ {
+ "name": "Nicola Asuni",
+ "email": "info@tecnick.com",
+ "role": "lead"
+ },
{
"name": "Combodo",
"email": "contact@combodo.com"
@@ -59,7 +64,7 @@
],
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
- "time": "2020-01-08T16:22:40+00:00"
+ "time": "2020-02-12T14:16:56+00:00"
},
{
"name": "nikic/php-parser",
diff --git a/lib/combodo/tcpdf/.github/FUNDING.yml b/lib/combodo/tcpdf/.github/FUNDING.yml
new file mode 100644
index 0000000000..ca5b4292e0
--- /dev/null
+++ b/lib/combodo/tcpdf/.github/FUNDING.yml
@@ -0,0 +1 @@
+custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project']
diff --git a/lib/combodo/tcpdf/.gitignore b/lib/combodo/tcpdf/.gitignore
new file mode 100644
index 0000000000..723ef36f4e
--- /dev/null
+++ b/lib/combodo/tcpdf/.gitignore
@@ -0,0 +1 @@
+.idea
\ No newline at end of file
diff --git a/lib/combodo/tcpdf/VERSION b/lib/combodo/tcpdf/VERSION
index 91e4a9f262..8ac3c44511 100644
--- a/lib/combodo/tcpdf/VERSION
+++ b/lib/combodo/tcpdf/VERSION
@@ -1 +1 @@
-6.3.2
+6.3.4
diff --git a/lib/combodo/tcpdf/composer.json b/lib/combodo/tcpdf/composer.json
index d9ac484352..fe90ae9eb5 100644
--- a/lib/combodo/tcpdf/composer.json
+++ b/lib/combodo/tcpdf/composer.json
@@ -6,8 +6,13 @@
"homepage": "https://github.com/combodo-itop-libs/TCPDF",
"type": "library",
"description": "TCPDF fork adding requirements for iTop: Specific fonts.",
- "license": "LGPL-3.0",
+ "license": "LGPL-3.0-only",
"authors": [
+ {
+ "name": "Nicola Asuni",
+ "email": "info@tecnick.com",
+ "role": "lead"
+ },
{
"name": "Combodo",
"email": "contact@combodo.com"
diff --git a/lib/combodo/tcpdf/include/barcodes/datamatrix.php b/lib/combodo/tcpdf/include/barcodes/datamatrix.php
index 19b46fadaf..783f99da4c 100644
--- a/lib/combodo/tcpdf/include/barcodes/datamatrix.php
+++ b/lib/combodo/tcpdf/include/barcodes/datamatrix.php
@@ -629,7 +629,7 @@ class Datamatrix {
if ($numch[ENC_C40] == $numch[ENC_X12]) {
$k = ($pos + $charscount + 1);
while ($k < $data_length) {
- $tmpchr = ord($data{$k});
+ $tmpchr = ord($data[$k]);
if ($this->isCharMode($tmpchr, ENC_X12)) {
return ENC_X12;
} elseif (!($this->isCharMode($tmpchr, ENC_X12) OR $this->isCharMode($tmpchr, ENC_C40))) {
diff --git a/lib/combodo/tcpdf/include/tcpdf_static.php b/lib/combodo/tcpdf/include/tcpdf_static.php
index 7d2c1f54a3..8e96869535 100644
--- a/lib/combodo/tcpdf/include/tcpdf_static.php
+++ b/lib/combodo/tcpdf/include/tcpdf_static.php
@@ -1,9 +1,9 @@
setImageBuffer($file, $info);
}
// set alignment
+ $this->img_rb_x = $x + $w;
$this->img_rb_y = $y + $h;
+
// set alignment
- if ($this->rtl) {
- if ($palign == 'L') {
- $ximg = $this->lMargin;
- } elseif ($palign == 'C') {
- $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2;
- } elseif ($palign == 'R') {
- $ximg = $this->w - $this->rMargin - $w;
- } else {
- $ximg = $x - $w;
- }
- $this->img_rb_x = $ximg;
+ if ($palign == 'L') {
+ $ximg = $this->lMargin;
+ } elseif ($palign == 'C') {
+ $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2;
+ } elseif ($palign == 'R') {
+ $ximg = $this->w - $this->rMargin - $w;
} else {
- if ($palign == 'L') {
- $ximg = $this->lMargin;
- } elseif ($palign == 'C') {
- $ximg = ($this->w + $this->lMargin - $this->rMargin - $w) / 2;
- } elseif ($palign == 'R') {
- $ximg = $this->w - $this->rMargin - $w;
- } else {
- $ximg = $x;
- }
- $this->img_rb_x = $ximg + $w;
+ $ximg = $x;
}
+
if ($ismask OR $hidden) {
// image is not displayed
return $info['i'];
@@ -7788,7 +7777,7 @@ class TCPDF {
if ($destroyall AND !$preserve_objcopy) {
self::$cleaned_ids[$this->file_id] = true;
// remove all temporary files
- if ($handle = opendir(K_PATH_CACHE)) {
+ if ($handle = @opendir(K_PATH_CACHE)) {
while ( false !== ( $file_name = readdir( $handle ) ) ) {
if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0) {
unlink(K_PATH_CACHE.$file_name);
@@ -7798,7 +7787,9 @@ class TCPDF {
}
if (isset($this->imagekeys)) {
foreach($this->imagekeys as $file) {
- if(substr($file, 0 , strlen(K_PATH_CACHE)) === K_PATH_CACHE && is_file($file)) unlink($file);
+ if (strpos($file, K_PATH_CACHE) === 0) {
+ @unlink($file);
+ }
}
}
}
@@ -7809,6 +7800,7 @@ class TCPDF {
'bufferlen',
'buffer',
'cached_files',
+ 'imagekeys',
'sign',
'signature_data',
'signature_max_length',
@@ -9638,6 +9630,16 @@ class TCPDF {
$xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/pdf/1.3/'."\n";
$xmp .= "\t\t\t\t\t\t".'pdf'."\n";
$xmp .= "\t\t\t\t\t\t".'Adobe PDF Schema'."\n";
+ $xmp .= "\t\t\t\t\t\t".''."\n";
+ $xmp .= "\t\t\t\t\t\t\t".''."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t".''."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t\t".'internal'."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t\t".'Adobe PDF Schema'."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t\t".'InstanceID'."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t\t".'URI'."\n";
+ $xmp .= "\t\t\t\t\t\t\t\t".''."\n";
+ $xmp .= "\t\t\t\t\t\t\t".''."\n";
+ $xmp .= "\t\t\t\t\t\t".''."\n";
$xmp .= "\t\t\t\t\t".''."\n";
$xmp .= "\t\t\t\t\t".''."\n";
$xmp .= "\t\t\t\t\t\t".'http://ns.adobe.com/xap/1.0/mm/'."\n";
@@ -12279,7 +12281,7 @@ class TCPDF {
$x = $this->w;
}
$fixed = false;
- if (!empty($page) AND ($page[0] == '*')) {
+ if (!empty($page) AND (substr($page, 0, 1) == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
@@ -12382,7 +12384,7 @@ class TCPDF {
$x = $this->w;
}
$fixed = false;
- if (!empty($page) AND ($page[0] == '*')) {
+ if ((string)$page && (((string)$page)[0] == '*')) {
$page = intval(substr($page, 1));
// this page number will not be changed when moving/add/deleting pages
$fixed = true;
@@ -23406,7 +23408,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
*/
protected function SVGPath($d, $style='') {
if ($this->state != 2) {
- return;
+ return;
}
// set fill/stroke style
$op = TCPDF_STATIC::getPathPaintOperator($style, '');
@@ -23426,6 +23428,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$xmax = 0;
$ymin = 2147483647;
$ymax = 0;
+ $xinitial = 0;
+ $yinitial = 0;
$relcoord = false;
$minlen = (0.01 / $this->k); // minimum acceptable length (3 point)
$firstcmd = true; // used to print first point
@@ -23470,6 +23474,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if ($ck == 1) {
$this->_outPoint($x, $y);
$firstcmd = false;
+ $xinitial = $x;
+ $yinitial = $y;
} else {
$this->_outLine($x, $y);
}
@@ -23657,8 +23663,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
if ((($ck + 1) % 7) == 0) {
$x0 = $x;
$y0 = $y;
- $rx = abs($params[($ck - 6)]);
- $ry = abs($params[($ck - 5)]);
+ $rx = max(abs($params[($ck - 6)]), .000000001);
+ $ry = max(abs($params[($ck - 5)]), .000000001);
$ang = -$rawparams[($ck - 4)];
$angle = deg2rad($ang);
$fa = $rawparams[($ck - 3)]; // large-arc-flag
@@ -23745,6 +23751,8 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
}
case 'Z': {
$this->_out('h');
+ $x = $x0 = $xinitial;
+ $y = $y0 = $yinitial;
break;
}
}
diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php
index 83ad48760d..c534b8aecd 100644
--- a/lib/composer/autoload_classmap.php
+++ b/lib/composer/autoload_classmap.php
@@ -6,8 +6,12 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
+ 'AbstractApplicationObjectExtension' => $baseDir . '/application/applicationextension.inc.php',
+ 'AbstractApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php',
+ 'AbstractPageUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php',
+ 'AbstractPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractWeeklyScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php',
'Action' => $baseDir . '/core/action.class.inc.php',
'ActionChecker' => $baseDir . '/core/userrights.class.inc.php',
@@ -148,6 +152,7 @@ return array(
'Combodo\\iTop\\TwigExtension' => $baseDir . '/application/twigextension.class.inc.php',
'Config' => $baseDir . '/core/config.class.inc.php',
'ConfigException' => $baseDir . '/core/config.class.inc.php',
+ 'ConfigPlaceholdersResolver' => $baseDir . '/core/config.class.inc.php',
'Console_Getopt' => $vendorDir . '/pear/console_getopt/Console/Getopt.php',
'ContextTag' => $baseDir . '/core/contexttag.class.inc.php',
'CoreCannotSaveObjectException' => $baseDir . '/core/coreexception.class.inc.php',
@@ -2109,6 +2114,7 @@ return array(
'ValueSetDefinition' => $baseDir . '/core/valuesetdef.class.inc.php',
'ValueSetEnum' => $baseDir . '/core/valuesetdef.class.inc.php',
'ValueSetEnumClasses' => $baseDir . '/core/valuesetdef.class.inc.php',
+ 'ValueSetEnumPadded' => $baseDir . '/core/valuesetdef.class.inc.php',
'ValueSetObjects' => $baseDir . '/core/valuesetdef.class.inc.php',
'ValueSetRange' => $baseDir . '/core/valuesetdef.class.inc.php',
'VariableExpression' => $baseDir . '/core/oql/expression.class.inc.php',
diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php
index 82c2ef0704..daffbf1001 100644
--- a/lib/composer/autoload_static.php
+++ b/lib/composer/autoload_static.php
@@ -236,8 +236,12 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
);
public static $classMap = array (
+ 'AbstractApplicationObjectExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
+ 'AbstractApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
+ 'AbstractPageUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
+ 'AbstractPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractWeeklyScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php',
'Action' => __DIR__ . '/../..' . '/core/action.class.inc.php',
'ActionChecker' => __DIR__ . '/../..' . '/core/userrights.class.inc.php',
@@ -378,6 +382,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'Combodo\\iTop\\TwigExtension' => __DIR__ . '/../..' . '/application/twigextension.class.inc.php',
'Config' => __DIR__ . '/../..' . '/core/config.class.inc.php',
'ConfigException' => __DIR__ . '/../..' . '/core/config.class.inc.php',
+ 'ConfigPlaceholdersResolver' => __DIR__ . '/../..' . '/core/config.class.inc.php',
'Console_Getopt' => __DIR__ . '/..' . '/pear/console_getopt/Console/Getopt.php',
'ContextTag' => __DIR__ . '/../..' . '/core/contexttag.class.inc.php',
'CoreCannotSaveObjectException' => __DIR__ . '/../..' . '/core/coreexception.class.inc.php',
@@ -2339,6 +2344,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'ValueSetDefinition' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
'ValueSetEnum' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
'ValueSetEnumClasses' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
+ 'ValueSetEnumPadded' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
'ValueSetObjects' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
'ValueSetRange' => __DIR__ . '/../..' . '/core/valuesetdef.class.inc.php',
'VariableExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
diff --git a/lib/composer/installed.json b/lib/composer/installed.json
index 3a90f17fe1..9ff117e696 100644
--- a/lib/composer/installed.json
+++ b/lib/composer/installed.json
@@ -1,17 +1,17 @@
[
{
"name": "combodo/tcpdf",
- "version": "6.3.2",
- "version_normalized": "6.3.2.0",
+ "version": "6.3.4",
+ "version_normalized": "6.3.4.0",
"source": {
"type": "git",
"url": "https://github.com/combodo-itop-libs/TCPDF.git",
- "reference": "2723050de47c8cbd78293656d896c0000442e23a"
+ "reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/2723050de47c8cbd78293656d896c0000442e23a",
- "reference": "2723050de47c8cbd78293656d896c0000442e23a",
+ "url": "https://api.github.com/repos/combodo-itop-libs/TCPDF/zipball/fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
+ "reference": "fe1c625d33e8f7d872d6fb69fb0255fd0e5cee2d",
"shasum": ""
},
"require": {
@@ -20,7 +20,7 @@
"replace": {
"tecnickcom/tcpdf": "self.version"
},
- "time": "2020-01-08T16:22:40+00:00",
+ "time": "2020-02-12T14:16:56+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -45,9 +45,14 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL-3.0"
+ "LGPL-3.0-only"
],
"authors": [
+ {
+ "name": "Nicola Asuni",
+ "email": "info@tecnick.com",
+ "role": "lead"
+ },
{
"name": "Combodo",
"email": "contact@combodo.com"