diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index cfb409a1380..379199c9cc7 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -39,7 +39,7 @@ $langs->load("other"); */ if (! empty($_POST["action"]) && $_POST["action"] == 'setlevel') { - dolibarr_set_const($db,"SYSLOG_LEVEL",$_POST["level"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db,"SYSLOG_LEVEL",$_POST["level"],'chaine',0,'',0); dol_syslog("admin/syslog: level ".$_POST["level"]); } @@ -53,8 +53,8 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set') // Only LOG_USER supported on Windows if (! empty($_SERVER["WINDIR"])) $_POST["facility"]='LOG_USER'; - dolibarr_del_const($db,"SYSLOG_FILE",$conf->entity); - dolibarr_set_const($db,"SYSLOG_FACILITY",$_POST["facility"],'chaine',0,'',$conf->entity); + dolibarr_del_const($db,"SYSLOG_FILE",0); + dolibarr_set_const($db,"SYSLOG_FACILITY",$_POST["facility"],'chaine',0,'',0); dol_syslog("admin/syslog: facility ".$_POST["facility"]); } else @@ -71,8 +71,8 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set') if ($file) { fclose($file); - dolibarr_del_const($db,"SYSLOG_FACILITY",$conf->entity); - dolibarr_set_const($db,"SYSLOG_FILE",$_POST["filename"],'chaine',0,'',$conf->entity); + dolibarr_del_const($db,"SYSLOG_FACILITY",0); + dolibarr_set_const($db,"SYSLOG_FILE",$_POST["filename"],'chaine',0,'',0); dol_syslog("admin/syslog: file ".$_POST["filename"]); } else @@ -97,12 +97,18 @@ print '
'; $def = array(); -$syslogfacility=$defaultsyslogfacility=dolibarr_get_const($db,"SYSLOG_FACILITY",$conf->entity); -$syslogfile=$defaultsyslogfile=dolibarr_get_const($db,"SYSLOG_FILE",$conf->entity); +$syslogfacility=$defaultsyslogfacility=dolibarr_get_const($db,"SYSLOG_FACILITY",0); +$syslogfile=$defaultsyslogfile=dolibarr_get_const($db,"SYSLOG_FILE",0); if (! $defaultsyslogfacility) $defaultsyslogfacility='LOG_USER'; if (! $defaultsyslogfile) $defaultsyslogfile='dolibarr.log'; +if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) +{ + print '
'.$langs->trans("ContactSuperAdminForChange").'
'; + $option = 'disabled="disabled"'; +} + // Output mode print_titre($langs->trans("SyslogOutput")); @@ -112,21 +118,20 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; $var=true; $var=!$var; -print ""; -print ''; +print ''; $var=!$var; -print ""; -print ''; +print ''; -$htmltext = $langs->trans("SyslogFilenameDesc",$conf->syslog->dir_output); -print "'; print "
'.$langs->trans("Type").''.$langs->trans("Parameter").'
".$langs->trans("SyslogSyslog")."'.$langs->trans("SyslogFacility").': '; +print '
'.$langs->trans("SyslogSyslog").''.$langs->trans("SyslogFacility").': '; print ' '.img_info('Only LOG_USER supported on Windows'); print '
".$langs->trans("SyslogSimpleFile")."'.$langs->trans("SyslogFilename").': '; +print '
'.$langs->trans("SyslogSimpleFile").''.$langs->trans("SyslogFilename").': '; print '".$html->textwithpicto('',$htmltext); +print "".$html->textwithpicto('',$langs->trans("YouCanUseDOL_DATA_ROOT")); print '
\n"; @@ -138,12 +143,12 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print "\n"; $var=true; $var=!$var; print ''; -print '
'.$langs->trans("Type").''.$langs->trans("Parameter").'
'.$langs->trans("SyslogLevel").'