Fix: log must use the mask defined into setup

Conflicts:
	htdocs/core/modules/syslog/mod_syslog_file.php
This commit is contained in:
Laurent Destailleur
2013-04-23 12:02:56 +02:00
parent ff3b2933a8
commit 3f1f065d4e

View File

@@ -96,7 +96,12 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
/**
* Return the parsed logfile path
*
<<<<<<< OURS
* @return string
=======
* @param string $suffixinfilename When output is a file, append this suffix into default log filename.
* @return string
>>>>>>> THEIRS
*/
private function getFilename()
{
@@ -111,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
*/
public function export($content)
{
global $conf;
$logfile = $this->getFilename();
if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+');
@@ -142,6 +149,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
fwrite($filefd, $message."\n");
fclose($filefd);
@chmod($logfile, octdec($conf->global->MAIN_UMASK));
}
}
}
}