Fix after the comment

This commit is contained in:
Inovea Conseil 2018-05-31 09:13:18 +02:00 committed by GitHub
parent 78b3067de3
commit 0f9fa09d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -667,10 +667,15 @@ if ($mode == 'common')
// Version // Version
print '<td class="center nowrap" width="120px">'; print '<td class="center nowrap" width="120px">';
print $versiontrans; print $versiontrans;
if (!empty($objMod->url_last_version)) { if(!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)){
$newversion = file_get_contents($objMod->url_last_version); require_once(DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php');
if (version_compare($newversion, $versiontrans) > 0) { if (!empty($objMod->url_last_version)) {
print "&nbsp;<span class='butAction' title='" . $langs->trans('LastStableVersion') . "'>$newversion</span>"; $newversion = getURLContent($objMod->url_last_version);
if(isset($newversion['content'])){
if (version_compare($newversion['content'], $versiontrans) > 0) {
print "&nbsp;<span class='butAction' title='" . $langs->trans('LastStableVersion') . "'>".$newversion['content']."</span>";
}
}
} }
} }
print "</td>\n"; print "</td>\n";