mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
fix add_log_line() if query string contains '/', log complete path to script
This commit is contained in:
parent
1d90291032
commit
96bff23919
|
@ -410,10 +410,13 @@ function add_log_line($msg="", $priority=null) { /* {{{ */
|
|||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
else
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
# $tmp = explode('?', $_SERVER['REQUEST_URI']);
|
||||
# $path = basename($tmp[0]).(isset($tmp[1]) ? '?'.$tmp[1] : '');
|
||||
$path = $_SERVER['REQUEST_URI'];
|
||||
if($user)
|
||||
$logger->log($user->getLogin()." (".$ip.") ".basename($_SERVER["REQUEST_URI"], ".php").($msg ? $msg : ''), $priority);
|
||||
$logger->log($user->getLogin()." (".$ip.") ".$path.($msg ? $msg : ''), $priority);
|
||||
else
|
||||
$logger->log("-- (".$ip.") ".basename($_SERVER["REQUEST_URI"]).($msg ? $msg : ''), $priority);
|
||||
$logger->log("-- (".$ip.") ".$path.($msg ? $msg : ''), $priority);
|
||||
} /* }}} */
|
||||
|
||||
function _add_log_line($msg="") { /* {{{ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user