NEW Syslog displays configuration errors
This commit is contained in:
parent
e5eefa685f
commit
3b5473abe4
@ -106,8 +106,17 @@ if ($action == 'set')
|
|||||||
$activeModules = $newActiveModules;
|
$activeModules = $newActiveModules;
|
||||||
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0);
|
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0);
|
||||||
|
|
||||||
|
// Check configuration
|
||||||
|
foreach ($activeModules as $modulename) {
|
||||||
|
/**
|
||||||
|
* @var LogHandler
|
||||||
|
*/
|
||||||
|
$module = new $modulename;
|
||||||
|
$error = $module->checkConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessage($langs->trans("SetupSaved"));
|
||||||
@ -115,7 +124,8 @@ if ($action == 'set')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"),'errors');
|
setEventMessage($error, 'errors');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user