From 17d5bb5cd450f659634dbf4e6e79d03a5cd9b8ea Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 2 Dec 2020 22:25:08 +0100 Subject: [PATCH 1/3] FIX 12.0 - error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated --- htdocs/commande/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 8ba4620b108..2c5157ff228 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -966,6 +966,8 @@ if (empty($reshook)) } $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } else { + $object->fetch_thirdparty(); } unset($_POST['prod_entry_mode']); From 068587fcee84f7016418ca4064243758a98010e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 14:30:07 +0100 Subject: [PATCH 2/3] Update card.php --- htdocs/commande/card.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 2c5157ff228..d9817dc38c3 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -953,7 +953,8 @@ if (empty($reshook)) if ($result > 0) { $ret = $object->fetch($object->id); // Reload to get new records - + $object->fetch_thirdparty(); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; @@ -966,8 +967,6 @@ if (empty($reshook)) } $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } else { - $object->fetch_thirdparty(); } unset($_POST['prod_entry_mode']); From ac29db92cbd2f462c7ead86f86a61cb0f8d4af35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 16:35:42 +0100 Subject: [PATCH 3/3] FIX #15618 --- htdocs/admin/system/dolibarr.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 97e7370a148..a2dcc434723 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -83,17 +83,23 @@ else if (DOL_VERSION != $conf->global->MAIN_VERSION_LAST_UPGRADE) print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired", DOL_VERSION, $conf->global->MAIN_VERSION_LAST_UPGRADE)); } +$version = DOL_VERSION; +if (preg_match('/[a-z]+/i', $version)) $version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log. +print '   '.$langs->trans("SeeChangeLog").''; + +$newversion = ''; if (function_exists('curl_init')) { $conf->global->MAIN_USE_RESPONSE_TIMEOUT = 10; print '     -     '; if ($action == 'getlastversion') { - if ($sfurl) - { + if ($sfurl) { + $i = 0; while (!empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) { $title = $sfurl->channel[0]->item[$i]->title; + $reg = array(); if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) { $newversion = $reg[1]; @@ -107,25 +113,23 @@ if (function_exists('curl_init')) // Show version print $langs->trans("LastStableVersion").' : '.(($version != '0.0') ? $version : $langs->trans("Unknown")).''; - } - else - { + if ($version != '0.0') { + print '   '.$langs->trans("SeeChangeLog").''; + } + } else { print $langs->trans("LastStableVersion").' : '.$langs->trans("UpdateServerOffline").''; } - } - else - { + } else { print $langs->trans("LastStableVersion").' : '.$langs->trans("Check").''; } } // Now show link to the changelog -print '     -     '; +//print '     -     '; $version = DOL_VERSION; if (preg_match('/[a-z]+/i', $version)) $version = 'develop'; // If version contains text, it is not an official tagged version, so we use the full change log. -print ''.$langs->trans("SeeChangeLog").''; print ''."\n"; print ''.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')'.$conf->global->MAIN_VERSION_LAST_UPGRADE.''."\n"; print ''.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.''."\n";