From c44c6d2bb1f8163fa73bde075f98f0c44a132da1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Apr 2009 19:02:31 +0000 Subject: [PATCH] Restore a lot of broken features. When entity is enabled, the most simple is to change the DATA_ROOT constants with no change of the rest of the code. --- htdocs/admin/syslog.php | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 2bce9ac0934..b42f3936129 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -65,22 +65,9 @@ if (! empty($_POST["action"]) && $_POST["action"] == 'set') if ($optionlogoutput == "file") { - $filelog = $_POST["filename"]; - - if (eregi('(^[A-Za-z0-9_\-\\/:]+[\\/]+)([A-Za-z0-9_\-]+[.]?[A-Za-z0-9]+)?$', $filelog)) - { - if (eregi('DOL_DATA_ROOT', $filelog)) - { - $filelog = eregi_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $filelog); - } - } - else if ($conf->syslog->dir_output) - { - $filelog = $conf->syslog->dir_output."/".$filelog; - } - + $filelog=$_POST["filename"]; + $filelog=eregi_replace('DOL_DATA_ROOT',DOL_DATA_ROOT,$filelog); $file=fopen($filelog,"a+"); - if ($file) { fclose($file); @@ -136,9 +123,8 @@ print ''; $var=!$var; print " ".$langs->trans("SyslogSimpleFile").""; -print ''.$langs->trans("SyslogFilename").': '; -$htmltext = $langs->trans("SyslogFilenameDesc",$conf->syslog->dir_output); -print "".$html->textwithhelp('',$htmltext); +print ''.$langs->trans("SyslogFilename").': '; +print ' '.img_info($langs->trans("YouCanUseDOL_DATA_ROOT")); print ''; print "\n";