mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
CSS
This commit is contained in:
@@ -851,19 +851,15 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
$versiontrans .= $objMod->getVersion(1);
|
||||
}
|
||||
|
||||
if ($objMod->isCoreOrExternalModule() == 'external'
|
||||
&& (
|
||||
$action == 'checklastversion'
|
||||
// This is a bad practice to activate a check on an external access during the building of the admin page. 1 external module can hang the application.
|
||||
// Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate()
|
||||
|| getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE')
|
||||
)
|
||||
) {
|
||||
if ($objMod->isCoreOrExternalModule() == 'external' && ($action == 'checklastversion' || getDolGlobalString('CHECKLASTVERSION_EXTERNALMODULE'))) {
|
||||
// Setting CHECKLASTVERSION_EXTERNALMODULE to on is a bad practice to activate a check on an external access during the building of the admin page.
|
||||
// 1 external module can hang the application.
|
||||
// Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate()
|
||||
$checkRes = $objMod->checkForUpdate();
|
||||
if ($checkRes > 0) {
|
||||
setEventMessage($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion);
|
||||
setEventMessages($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion, null, 'warnings');
|
||||
} elseif ($checkRes < 0) {
|
||||
setEventMessage($objMod->getName().' '.$langs->trans('CheckVersionFail'), 'warnings');
|
||||
setEventMessages($objMod->getName().' '.$langs->trans('CheckVersionFail'), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1092,7 +1088,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
||||
|
||||
if ($action == 'checklastversion') {
|
||||
if ($foundoneexternalmodulewithupdate) {
|
||||
setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'mesgs');
|
||||
setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'warnings');
|
||||
} else {
|
||||
setEventMessages($langs->trans("NoExternalModuleWithUpdate"), null, 'mesgs');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user