"MDL-16954, get rid of remote_addr notice on cli, set ip = 0.0.0.0 in mdl_log table when accessed from cli"

This commit is contained in:
dongsheng
2008-12-11 05:17:02 +00:00
parent 50a8526252
commit 576fe29a1c
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -7511,7 +7511,11 @@ function getremoteaddr() {
return cleanremoteaddr($_SERVER['HTTP_X_FORWARDED_FOR']);
}
}
return cleanremoteaddr($_SERVER['REMOTE_ADDR']);
if (!empty($_SERVER['REMOTE_ADDR'])) {
return cleanremoteaddr($_SERVER['REMOTE_ADDR']);
} else {
return null;
}
}
/**