2006-09-16 18:16:19 +02:00
2018-10-13 11:19:41 +02:00
This file describes changes made on external libraries after being included
2008-04-17 02:16:07 +02:00
in Dolibarr root.
2011-07-06 15:01:36 +02:00
2024-03-27 10:52:09 +01:00
2009-10-25 18:57:23 +01:00
ALL:
----
2017-07-17 20:20:38 +02:00
Check "@CHANGE"
2009-01-21 18:28:56 +01:00
2011-04-09 18:14:19 +02:00
2020-07-29 13:10:31 +02:00
2024-05-12 20:27:03 +02:00
PCLZIP
------
Replace
touch($p_entry['filename'], $p_entry['mtime']);
With
@touch($p_entry['filename'], $p_entry['mtime']);
2024-03-27 10:52:09 +01:00
PHP PrestaShopWebservice:
-------------------------
2019-03-31 18:21:00 +02:00
Replace
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
With
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date');
2024-03-27 10:52:09 +01:00
PHP PHPIMAP:
------------
2024-03-27 10:43:08 +01:00
* In htdocs/includes/webklex/php-imap/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php
Replace:
self::setLastErrors(parent::getLastErrors());
with:
if (parent::getLastErrors()) {
self::setLastErrors(parent::getLastErrors());
}
2024-03-27 10:52:09 +01:00
PHP CKEDITOR:
-------------
2016-04-22 11:09:47 +02:00
* In ckeditor/ckeditor/contents.css
Replace:
2017-02-28 10:49:58 +01:00
body { ... margin: 20px;
2016-04-22 11:09:47 +02:00
With
2017-02-28 10:49:58 +01:00
body { ... margin: 5px;
2016-04-22 11:09:47 +02:00
2023-11-14 01:48:44 +01:00
* In ckeditor/ckeditor/ckeditor.js
Replace:
d.items&&
With
d&&d.items&&
2024-03-23 17:18:11 +01:00
2016-04-22 11:09:47 +02:00
2024-03-27 10:52:09 +01:00
PHP ESCPOS:
-----------
2019-07-15 23:25:42 +02:00
Replace
private $connector;
With
protected $connector;
2024-03-27 10:52:09 +01:00
PHP SABRE:
----------
2024-01-09 20:32:31 +01:00
rm -fr ./htdocs/includes/sabre/sabre/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/bin;
rm -fr ./htdocs/includes/sabre/sabre/*/*/*/*/bin;
2019-07-15 23:25:42 +02:00
2024-03-27 10:52:09 +01:00
PHP NUSOAP:
-----------
2023-12-16 19:24:41 +01:00
* Line 1257 of file nusoap.php. Add:
2010-04-13 23:33:02 +02:00
2023-12-16 19:24:41 +01:00
libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.
2024-03-23 17:18:11 +01:00
2023-12-16 19:24:41 +01:00
* Line 4346 of file nusoap.php
2020-12-27 19:33:07 +01:00
2023-12-16 19:24:41 +01:00
$rev = array();
preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev);
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")";
2020-12-27 19:33:07 +01:00
2023-12-17 13:23:06 +01:00
* Line 6566 of file nusoap.php, replace
if (count($attrs) > 0) {
with
if (is_array($attrs) && count($attrs) > 0) {
2020-12-27 19:33:07 +01:00
2009-01-21 18:28:56 +01:00
2016-04-22 11:09:47 +02:00
2024-03-27 10:52:09 +01:00
PHP TCPDF:
----------
2024-01-10 22:10:13 +01:00
* Modify in tcpdf.php: make TCPDF::_out public.
(htdocs/core/lib/pdf.lib.php uses it as a public method)
Change:
protected function _out($s)
to
public function _out($s)
Change in method's _out phpdoc:
* @protected
to
* @public
2023-12-28 19:07:27 +01:00
* Replace in tcpdf.php:
2020-02-03 06:28:04 +01:00
$preserve = array(
'file_id',
'state',
'bufferlen',
'buffer',
'cached_files',
with
$preserve = array(
'file_id',
'state',
'bufferlen',
'buffer',
'cached_files',
//Â @CHANGE DOL
'imagekeys',
2023-12-28 19:07:27 +01:00
* Replace in tcpdf.php:
2024-06-22 16:16:11 +02:00
if (!@this->fileExists($file)) {
2023-12-22 11:05:17 +01:00
return false;
2020-02-03 06:28:04 +01:00
}
with
2024-06-22 16:16:11 +02:00
if (!@this->fileExists($file)) {
2020-02-03 06:28:04 +01:00
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
2024-06-22 16:16:11 +02:00
//var_dump($file.' '.(!@this->fileExists($file)));
2024-03-23 17:18:11 +01:00
//return false;
2022-02-25 19:39:34 +01:00
$tfile = str_replace(' ', '%20', $file);
2024-06-22 16:16:11 +02:00
if (@this->fileExists($tfile)) {
2022-02-25 19:39:34 +01:00
$file = $tfile;
}
2020-02-03 06:28:04 +01:00
}
2024-03-23 17:18:11 +01:00
2023-12-28 19:07:27 +01:00
* Replace in tcpdf.php:
2020-04-15 20:00:27 +02:00
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
with
// @CHANGE LDR Add support for src="file://..." links
if (strpos($imgsrc, 'file://') === 0) {
$imgsrc = str_replace('file://', '/', $imgsrc);
$imgsrc = urldecode($imgsrc);
$testscrtype = @parse_url($imgsrc);
if (empty($testscrtype['query'])) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
// convert URL to server path
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
}
}
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
2020-02-03 06:28:04 +01:00
2023-12-28 19:07:27 +01:00
* In tecnickcom/tcpdf/include/tcpdf_static.php, in function fopenLocal, replace:
2019-12-01 18:56:34 +01:00
if (strpos($filename, '://') === false) {
with
2021-01-04 14:03:00 +01:00
if (strpos($filename, '//') === 0) {
2019-12-01 18:56:34 +01:00
// Share folder on a (windows) server
// e.g.: "//[MyServerName]/[MySharedFolder]/"
//
// nothing to change
}
elseif (strpos($filename, '://') === false)
2024-06-22 16:16:11 +02:00
* In tecnickcom/tcpdf/include/barcodes/qrcode.php To avoid to have QRcode changed because generated with a random mask, replace:
2023-12-28 19:07:27 +01:00
define('QR_FIND_FROM_RANDOM', 2);
2016-04-08 15:09:31 +02:00
with
2023-12-28 19:07:27 +01:00
define('QR_FIND_FROM_RANDOM', false);
2016-04-08 15:09:31 +02:00
2023-12-28 19:07:27 +01:00
* Change line:
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
into
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);
2024-03-23 17:18:11 +01:00
2017-02-28 10:49:58 +01:00
* Removed useless directories ("examples", "tools")
2016-04-22 11:09:47 +02:00
2024-01-12 17:14:13 +01:00
* Optionally, removed all fonts except
dejavusans* (used by greek, arab, person, romanian, turkish),
2023-12-22 11:05:17 +01:00
freemono* (russian),
cid*+msungstdlight+stsongstdlight+uni2cid* (chinese),
2016-04-22 11:09:47 +02:00
helvetica* (all other languages),
zapfdingbats.php (for special chars like form checkboxes)
2024-01-12 17:14:13 +01:00
* Optionally, made freemono the default monotype font if we removed courier
2019-10-08 09:58:47 +02:00
In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
2014-03-06 18:15:50 +01:00
- protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono';
2023-09-10 14:49:39 +02:00
* Add this at begin of tcpdf_autoconfig.php
// @CHANGE LDR DOCUMENT_ROOT fix for IIS Webserver
if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) {
if (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['PHP_SELF'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
} elseif(isset($_SERVER['PATH_TRANSLATED'])) {
$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
} else {
// define here your DOCUMENT_ROOT path if the previous fails (e.g. '/var/www')
$_SERVER['DOCUMENT_ROOT'] = '/';
}
}
$_SERVER['DOCUMENT_ROOT'] = str_replace('//', '/', $_SERVER['DOCUMENT_ROOT']);
if (substr($_SERVER['DOCUMENT_ROOT'], -1) != '/') {
$_SERVER['DOCUMENT_ROOT'] .= '/';
}
2020-02-03 06:28:04 +01:00
2015-12-20 21:28:05 +01:00
2024-03-27 10:52:09 +01:00
PHP TCPDI:
----------
2021-01-04 14:03:00 +01:00
Add file fpdf_tpl.php 1.2
2020-07-27 13:52:19 +02:00
2021-01-04 14:03:00 +01:00
Add file tcpdi.php
2018-10-24 02:32:01 +02:00
2021-01-04 14:03:00 +01:00
Add file tcpdi_parser.php and replace:
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
2015-03-02 01:38:40 +01:00
with:
2021-01-04 14:03:00 +01:00
require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php');
2015-03-02 01:38:40 +01:00
2021-01-04 14:03:00 +01:00
* Fix syntax error by replacing
2018-10-24 02:32:01 +02:00
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
2023-12-27 14:40:16 +01:00
with
2018-10-24 02:32:01 +02:00
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
2021-10-18 15:26:18 +02:00
* Fix php fatal error on php 8.0 on tcpdi.php
while (list($k, $v) = each($value[1])) {
with
foreach ($value[1] as $k => $v) {
2015-03-02 01:38:40 +01:00
2024-03-23 17:18:11 +01:00
* Fix by replacing
2023-01-29 20:52:24 +01:00
if ($res[0] == PDF_TYPE_OBJECT)
with
2023-02-06 14:21:25 +01:00
if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT)
2023-01-29 20:52:24 +01:00
2022-02-09 17:41:32 +01:00
2024-03-27 10:52:09 +01:00
PHP JQUERYFILETREE:
-------------------
2014-01-20 02:21:30 +01:00
* Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors
2015-11-22 17:17:06 +01:00
2022-02-09 17:41:32 +01:00
2024-03-27 10:52:09 +01:00
PHP RESTLER:
------------
2017-11-17 12:54:49 +01:00
* Add line into Util.php to complete function
public static function getShortName($className)
{
// @CHANGE LDR
2020-12-23 17:25:38 +01:00
if (!is_string($className)) return;
2017-11-17 12:54:49 +01:00
//var_dump($className);
2017-11-25 02:32:25 +01:00
2020-12-23 17:25:38 +01:00
* Add line into Data/Text.php to complete function
public static function endsWith($haystack, $needle)
{
$length = strlen($needle);
if ($length == 0) {
return true;
}
// @CHANGE LDR
if (!is_string($haystack)) return false;
2024-03-23 17:18:11 +01:00
* Replace
2021-05-20 14:16:31 +02:00
$loaders = array_unique(static::$rogueLoaders);
2024-03-23 17:18:11 +01:00
with
2021-05-20 14:16:31 +02:00
$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);
2024-03-23 17:18:11 +01:00
2022-06-13 19:57:11 +02:00
* Replace CommentParser.php line 423
elseif (count($value) && is_numeric($value[0]))
2024-03-23 17:18:11 +01:00
2022-06-13 19:57:11 +02:00
with
2024-03-23 17:18:11 +01:00
2022-06-13 19:57:11 +02:00
elseif (count($value) && isset($value[0]) && is_numeric($value[0]))
2021-05-20 14:16:31 +02:00
2022-11-24 23:25:06 +01:00
* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1
empty($value[0]) ? null :
empty($value[1]) ? null :
2020-12-23 17:25:38 +01:00
2023-12-27 14:40:16 +01:00
* Add a test into AutoLoader.php to complete function loadThisLoader and test if property exists before calling it. For this replace code
2023-12-22 11:05:17 +01:00
2023-12-27 14:40:16 +01:00
if (false !== $file = $b::$loader[1]($className) && $this->exists($className, $b::$loader[1])) {
return $file;
}
with:
//avoid PHP Fatal error: Uncaught Error: Access to undeclared static property: Composer\\Autoload\\ClassLoader::$loader
//in case of multiple autoloader systems
if(property_exists($b, $loader[1])) {
if (false !== $file = $b::$loader[1]($className)
&& $this->exists($className, $b::$loader[1])) {
return $file;
}
}
2024-01-02 14:45:49 +01:00
2021-04-25 17:41:59 +02:00
+With swagger 2 provided into /explorer:
----------------------------------------
Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
2024-03-27 10:52:09 +01:00
PHP PARSEDOWN
-------------
2017-11-25 02:32:25 +01:00
2017-12-16 12:11:46 +01:00
* Add support of css by adding in Parsedown.php:
// @CHANGE LDR
2023-12-22 11:05:17 +01:00
'class' => $Link['element']['attributes']['class']
2017-12-16 12:11:46 +01:00
...
2023-12-22 11:05:17 +01:00
2017-12-16 12:11:46 +01:00
// @CHANGE LDR
2023-12-27 14:40:16 +01:00
if (preg_match('/{([^}]+)}/', $remainder, $matches2)) {
$Element['attributes']['class'] = $matches2[1];
$remainder = preg_replace('/{'.preg_quote($matches2[1],'/').'}/', '', $remainder);
}
2017-12-16 12:11:46 +01:00
// @CHANGE LDR
//$markup .= $this->{$Element['handler']}($Element['text']);
$markup .= preg_replace('/>{[^}]+}/', '>', $this->{$Element['handler']}($Element['text']));
2017-11-25 02:32:25 +01:00
* Fix to avoid fatal error when mb_strlen not available:
// @CHANGE LDR Fix when mb_strlen is not available
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
else $len = strlen($line);
$shortage = 4 - $len % 4;
2017-12-20 13:17:21 +01:00
2020-02-16 21:16:00 +01:00
2024-03-27 10:52:09 +01:00
PHP OAUTH
---------
2024-08-13 14:23:49 +02:00
Restore old OAuth2/Service/Google.php file and OAuth2/Service/Microsoft.php and OAuth2/Service/Microsoft2.php
Or add into Class Google of file OAuth2/Service/Google:
2020-02-16 21:16:00 +01:00
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
public $approvalPrompt='auto';
public function setApprouvalPrompt($prompt)
{
if (!in_array($prompt, array('auto', 'force'), true)) {
// @todo Maybe could we rename this exception
throw new InvalidAccessTypeException('Invalid approuvalPrompt, expected either auto or force.');
}
$this->approvalPrompt = $prompt;
}
2023-12-22 11:05:17 +01:00
2020-02-16 21:16:00 +01:00
2024-08-13 14:23:49 +02:00
Modify function
public function getAuthorizationEndpoint()
{
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
//return new Uri('https://accounts.google.com/o/oauth2/auth?access_type='.$this->accessType);
$url = 'https://accounts.google.com/o/oauth2/auth?'.($this->approvalPrompt?'approval_prompt='.$this->approvalPrompt.'&':'').'access_type='.$this->accessType;
return new Uri($url);
}
2020-02-16 21:16:00 +01:00
2024-03-27 10:52:09 +01:00
JS JSGANTT:
-----------
* Replace in function JSGantt.taskLink
window.open(pRef, 'newwin', 'height=' + vHeight + ',width=' + vWidth);
with
// @CHANGE DOLI To open in same window
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
window.location.href=pRef
* Replace '% Comp.' to have a smaller text column header
'comp': '%...'
with
'comp': '%'
JS JEDITABLE
2017-12-20 13:17:21 +01:00
------------
* <button type="submit" /> => <button class="button" type="submit" />
* <button type="cancel" /> => <button class="button" type="cancel" />
2020-04-18 15:11:38 +02:00
2024-03-27 10:52:09 +01:00
JS SELECT2
----------
2020-04-18 15:11:38 +02:00
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
.select2-hidden-accessible {
2020-12-17 21:41:39 +01:00
margin: -10000px !important; /* line to restore */
2020-04-18 15:11:38 +02:00
}
2024-03-27 10:52:09 +01:00
JS JCROP:
----------
* Remove analytics tag into file index.html