cvs: phpweb /include ip-to-country.inc langchooser.inc prepend.inc

From: Date: Tue, 27 May 2003 16:40:06 +0000
Subject: cvs: phpweb /include ip-to-country.inc langchooser.inc prepend.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18143@lists.php.net to get a copy of this message
goba Tue May 27 12:40:06 2003 EDT Modified files: /phpweb/include ip-to-country.inc langchooser.inc prepend.inc Log: Remove PHP < 4.1.0 BC code - the creation of $_.. vars - global-ing them before usage These are not needed anymore, we have all mirrors with PHP > 4.1.0, and those having old versions are disabled Index: phpweb/include/ip-to-country.inc diff -u phpweb/include/ip-to-country.inc:1.17 phpweb/include/ip-to-country.inc:1.18 --- phpweb/include/ip-to-country.inc:1.17 Mon May 26 14:44:19 2003 +++ phpweb/include/ip-to-country.inc Tue May 27 12:40:05 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: ip-to-country.inc,v 1.17 2003/05/26 18:44:19 goba Exp $ +// $Id: ip-to-country.inc,v 1.18 2003/05/27 16:40:05 goba Exp $ /* @@ -47,7 +47,7 @@ // cookie already storing this information) function i2c_go() { - global $_SERVER, $_COOKIE, $COUNTRY; + global $COUNTRY; // Get the real IP of the user $ipnum = i2c_realip(); @@ -85,8 +85,6 @@ // Find nearest index entry for IP number function i2c_search_in_index($ip) { - global $_SERVER; - // Indexed part and record number to jump to $idxpart = 0; $recnum = 0; @@ -126,8 +124,6 @@ // $ip should be an IP number and not an IP address function i2c_search_in_db($ip, $idx) { - global $_SERVER; - // Default range and country $range_start = 0; $range_end = 0; $country = "NA"; @@ -188,8 +184,6 @@ // Returns the real IP address of the user function i2c_realip() { - global $_SERVER; - // No IP found (will be overwritten by for // if any IP is found behind a firewall) $ip = FALSE; Index: phpweb/include/langchooser.inc diff -u phpweb/include/langchooser.inc:1.27 phpweb/include/langchooser.inc:1.28 --- phpweb/include/langchooser.inc:1.27 Sat May 24 15:50:37 2003 +++ phpweb/include/langchooser.inc Tue May 27 12:40:05 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: langchooser.inc,v 1.27 2003/05/24 19:50:37 goba Exp $ +// $Id: langchooser.inc,v 1.28 2003/05/27 16:40:05 goba Exp $ /* @@ -42,8 +42,6 @@ function language_choose_code() { - global $_REQUEST, $_SERVER, $_COOKIE; - // Contains all the languages picked up by the // process in priority order (without repeating codes) $languages = array(); Index: phpweb/include/prepend.inc diff -u phpweb/include/prepend.inc:1.26 phpweb/include/prepend.inc:1.27 --- phpweb/include/prepend.inc:1.26 Sat May 24 15:50:37 2003 +++ phpweb/include/prepend.inc Tue May 27 12:40:05 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: prepend.inc,v 1.26 2003/05/24 19:50:37 goba Exp $ +// $Id: prepend.inc,v 1.27 2003/05/27 16:40:05 goba Exp $ // Start measuring time spent on page $page_creation_start = getmicrotime(); @@ -21,21 +21,6 @@ unset($COUNTRY); unset($ONLOAD); unset($MYPHPNET); - -// Backward compatible array creation. After this point, the -// PHP 4.1.0+ arrays can be used to access variables coming -// from outside PHP. But it should be noted that these variables -// are not necessarily superglobals, so they need to be global-ed! -/* -if (!isset($_SERVER)) { - $_GET = &$HTTP_GET_VARS; - $_POST = &$HTTP_POST_VARS; - $_ENV = &$HTTP_ENV_VARS; - $_SERVER = &$HTTP_SERVER_VARS; - $_COOKIE = &$HTTP_COOKIE_VARS; - $_REQUEST = array_merge($_GET, $_POST, $_COOKIE); -} -*/ // Load the My PHP.net settings before any includes myphpnet_load();

« previous php.mirrors (#18143) next »