From: <var...@us...> - 2012-11-14 17:33:15
|
Revision: 8460 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8460&view=rev Author: vargenau Date: 2012-11-14 17:33:09 +0000 (Wed, 14 Nov 2012) Log Message: ----------- is_localhost has no parameter Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2012-11-14 17:31:23 UTC (rev 8459) +++ trunk/lib/stdlib.php 2012-11-14 17:33:09 UTC (rev 8460) @@ -94,7 +94,7 @@ printSimpleTrace($bt) getMemoryUsage() binary_search($needle, $haystack) - is_localhost($url) + is_localhost() javascript_quote_string($s) isSerialized($s) is_whole_number($var) @@ -2448,12 +2448,9 @@ } } -function is_localhost($url = false) +function is_localhost() { - if (!$url) { - global $HTTP_SERVER_VARS; - return $HTTP_SERVER_VARS['SERVER_ADDR'] == '127.0.0.1'; - } + return $_SERVER['SERVER_ADDR'] == '127.0.0.1'; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |