From 0f9fa09d3f0a33bc6c87cfe02e41772b21f806dd Mon Sep 17 00:00:00 2001 From: Inovea Conseil Date: Thu, 31 May 2018 09:13:18 +0200 Subject: [PATCH] Fix after the comment --- htdocs/admin/modules.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4b9de2568c7..b466a3cba54 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -667,10 +667,15 @@ if ($mode == 'common') // Version print ''; print $versiontrans; - if (!empty($objMod->url_last_version)) { - $newversion = file_get_contents($objMod->url_last_version); - if (version_compare($newversion, $versiontrans) > 0) { - print " $newversion"; + if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){ + require_once(DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'); + if (!empty($objMod->url_last_version)) { + $newversion = getURLContent($objMod->url_last_version); + if(isset($newversion['content'])){ + if (version_compare($newversion['content'], $versiontrans) > 0) { + print " ".$newversion['content'].""; + } + } } } print "\n";