Enhancement for #14589
This commit is contained in:
parent
72a9cf8820
commit
e4bd75dbdc
@ -212,6 +212,12 @@ foreach ($syslogModules as $moduleName)
|
|||||||
print '<td width="140">';
|
print '<td width="140">';
|
||||||
print '<input class="oddeven" type="checkbox" name="SYSLOG_HANDLERS[]" value="'.$moduleName.'" '.(in_array($moduleName, $activeModules) ? 'checked' : '').($moduleactive <= 0 ? 'disabled' : '').'> ';
|
print '<input class="oddeven" type="checkbox" name="SYSLOG_HANDLERS[]" value="'.$moduleName.'" '.(in_array($moduleName, $activeModules) ? 'checked' : '').($moduleactive <= 0 ? 'disabled' : '').'> ';
|
||||||
print $module->getName();
|
print $module->getName();
|
||||||
|
if ($moduleName == 'mod_syslog_syslog') {
|
||||||
|
if (! $module->isActive()) {
|
||||||
|
$langs->load("errors");
|
||||||
|
print $form->textwithpicto('', $langs->trans("ErrorPHPNeedModule", 'SysLog'));
|
||||||
|
}
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
return 'Syslog';
|
return 'Syslogd';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1600,7 +1600,7 @@ SyslogLevel=Level
|
|||||||
SyslogFilename=File name and path
|
SyslogFilename=File name and path
|
||||||
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
|
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
|
||||||
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
|
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
|
||||||
OnlyWindowsLOG_USER=Windows only supports LOG_USER
|
OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported
|
||||||
CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug)
|
CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug)
|
||||||
SyslogFileNumberOfSaves=Number of backup logs to keep
|
SyslogFileNumberOfSaves=Number of backup logs to keep
|
||||||
ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency
|
ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency
|
||||||
|
|||||||
@ -144,7 +144,9 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
|
|||||||
$errormessage = 'Access refused to '.$ip.' by SQL or Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')';
|
$errormessage = 'Access refused to '.$ip.' by SQL or Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')';
|
||||||
print $errormessage;
|
print $errormessage;
|
||||||
// Add entry into error log
|
// Add entry into error log
|
||||||
error_log($errormessage);
|
if (function_exists('error_log')) {
|
||||||
|
error_log($errormessage);
|
||||||
|
}
|
||||||
// TODO Add entry into security audit table
|
// TODO Add entry into security audit table
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user