From 13e64d2f79df129e8fad1749c51e91f9e710fbe1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Aug 2021 19:46:37 +0200 Subject: [PATCH 1/3] Fix replace file_get_contents with getURLContent --- htdocs/blockedlog/ajax/check_signature.php | 19 ++++++++++++------- htdocs/core/class/google.class.php | 6 ++++-- htdocs/printing/index.php | 3 ++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index ba164e3e715..4d59b56a981 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -17,9 +17,9 @@ */ /** - * \file htdocs/blockedlog/ajax/block-info.php + * \file htdocs/blockedlog/ajax/check_signature.php * \ingroup blockedlog - * \brief block-info + * \brief This page is not used yet. */ @@ -38,13 +38,15 @@ if (!defined('NOREQUIREHTML')) { require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; +require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; + if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { exit('BLOCKEDLOG_AUTHORITY_URL not set'); } -require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; -require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; $auth = new BlockedLogAuthority($db); $auth->syncSignatureWithAuthority(); @@ -63,8 +65,11 @@ if (is_array($bocks)) { $hash = $auth->getBlockchainHash(); -$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$auth->signature.'&h='.$hash; +// Call external authority +$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.urlencode($auth->signature).'&h='.urlencode($hash); + +$resarray = getURLContent($url, 'GET', '', 1, array(), array(), 2); +$res = $resarray['content']; -$res = file_get_contents($url); //echo $url; -echo $res; +echo dol_escape_htmltag($res); diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index ee122ff7cb5..4a91d548122 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -66,10 +66,12 @@ class GoogleAPI $i = 0; // Desired address - $urladdress = "https://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".$this->key; + $urladdress = "https://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".urlencode($this->key); // Retrieve the URL contents - $page = file_get_contents($urladdress); + require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; + $pagearray = getURLContent($urladdress, 'GET'); + $page = $pagearray['content']; $code = strstr($page, ''); $code = strstr($code, '>'); diff --git a/htdocs/printing/index.php b/htdocs/printing/index.php index 84132c784f4..2d20db4ddf7 100644 --- a/htdocs/printing/index.php +++ b/htdocs/printing/index.php @@ -58,7 +58,8 @@ foreach ($result as $driver) { $classname = 'printing_'.$driver; $langs->load($driver); $printer = new $classname($db); - if ($conf->global->{$printer->active}) { + $keyforprinteractive = $printer->active; + if ($keyforprinteractive && $conf->global->$keyforprinteractive) { //$printer->listJobs('commande'); $result = $printer->listJobs(); print $printer->resprint; From 4e4c8a9cb56496cfcb25cbdb64fc7e5f788964b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Aug 2021 01:55:00 +0200 Subject: [PATCH 2/3] Prepare 14.0.1 --- ChangeLog | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index b54d8df615e..224e919d526 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,45 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 14.0.1 compared to 14.0.0 ***** + +FIX: $conf->task used but it does not exist, use $conf->projet instead +FIX: #18181 +FIX: #18212 : Add url field +FIX: #18267 +FIX: #18289 #18294 +FIX: #18341 lang not loaded +FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice +FIX: #18399 Fix shipment validation email template override. +FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT) +FIX: Accountancy - Rules to delete & modify transaction not applied in ledger & subledger +FIX: Accountancy - Search date on journal +FIX: Accountancy - SQL error on select journal on journal +FIX: Accountancy - SQL error when insert a manuel transaction +FIX: add include missing file '/core/actions_dellink.inc.php' in project card +FIX: avoid to have link to create bookmark on page to create bookmark +FIX: bad approver shown on holiday once approved +FIX: bad closing div on error message +FIX: cannot add time spentd when column ref is not displayed +FIX: Can't remove a permission of a group +FIX: Can't set cost price when product is not on purchase +FIX: compatibility postgresql +FIX: filter on status Draft in modulebuilder +FIX: holiday card: hooks uninitialized +FIX: Invoice - Missing button to reopen an abandoned situation invoice +FIX: Link of download main doc on vat list +FIX: look and field v14 +FIX: Missing column Date validation in ledger & subledger +FIX: on admin/pdf.php (with javascript enabled) if you set some boolean confs then click on "save", all boolean values are reset +FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref) +FIX: postgresql filter select search extrafield +FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object +FIX: show info of company into user dropdown +FIX: totalDayAll hours in tasks +FIX: update product lot +FIX: using Tulip, deposit mask was not saved +FIX: #yogosha6907 + ***** ChangeLog for 14.0.0 compared to 13.0.0 ***** From 9b5a6f4298f8ffe89527d68f1274ba6a2b461d86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Aug 2021 02:48:45 +0200 Subject: [PATCH 3/3] Fix signature file must be zip if possible --- build/generate_filelist_xml.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index f5d9f64e518..e5f83e42cfc 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -48,17 +48,16 @@ $includecustom=0; $includeconstants=array(); if (empty($argv[1])) { - print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; exit -1; } -parse_str($argv[1]); $i=0; while ($i < $argc) { if (! empty($argv[$i])) { - parse_str($argv[$i]); + parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ... } if (preg_match('/includeconstant=/', $argv[$i])) { $tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str() @@ -237,6 +236,11 @@ fputs($fp, ''."\n"); fputs($fp, ''."\n"); fclose($fp); -print "File ".$outputfile." generated\n"; +if (empty($buildzip)) { + print "File ".$outputfile." generated\n"; +} else { + dol_compress_file($outputfile, $outputfile.'.zip'); + print "File ".$outputfile.".zip generated\n"; +} exit(0);