Changed one call to gethostbyaddr() to use numeric

ip instead. Such information is only stored in DB
(page->author) and not critical at all. Suggested
by Derry in http://moodle.org/mod/forum/discuss.php?d=32171
because it was causing important delays when clients
weren't DNS-registered.
This commit is contained in:
stronk7
2005-11-01 17:45:26 +00:00
parent f6ce611ce4
commit 71deda82fe
+1 -1
View File
@@ -2996,7 +2996,7 @@ function ewiki_author($defstr="") {
$author = @$GLOBALS["ewiki_author"];
($ip = getremoteaddr()) or ($ip = "127.0.0.0");
($port = $_SERVER["REMOTE_PORT"]) or ($port = "null");
$hostname = gethostbyaddr($ip);
$hostname = $ip;
$remote = (($ip != $hostname) ? $hostname . " " : "")
. $ip . ":" . $port;