fixed syslog() for CLI mode

This commit is contained in:
Savetheinternet 2011-12-06 03:04:46 +11:00
parent 38c53c9002
commit 2050a97e13

View File

@ -165,7 +165,14 @@
}
function _syslog($priority, $message) {
if( isset($_SERVER['REMOTE_ADDR']) &&
isset($_SERVER['REQUEST_METHOD']) &&
isset($_SERVER['REQUEST_URI'])) {
// CGI
syslog($priority, $message . ' - client: ' . $_SERVER['REMOTE_ADDR'] . ', request: "' . $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . '"');
} else {
syslog($priority, $message);
}
}
function loadThemeConfig($_theme) {