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

From: Date: Sat, 17 May 2003 12:54:36 +0000
Subject: cvs: phpweb /include ip-to-country.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-17761@lists.php.net to get a copy of this message
goba Sat May 17 08:54:36 2003 EDT Modified files: /phpweb/include ip-to-country.inc Log: A country should only be valid, if we have a name to display for it (we don't have a name for XEU for example, which is not a country) Index: phpweb/include/ip-to-country.inc diff -u phpweb/include/ip-to-country.inc:1.10 phpweb/include/ip-to-country.inc:1.11 --- phpweb/include/ip-to-country.inc:1.10 Sat May 17 08:45:51 2003 +++ phpweb/include/ip-to-country.inc Sat May 17 08:54:36 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: ip-to-country.inc,v 1.10 2003/05/17 12:45:51 goba Exp $ +// $Id: ip-to-country.inc,v 1.11 2003/05/17 12:54:36 goba Exp $ /* @@ -188,8 +188,8 @@ // Check if the current country is valid function i2c_valid_country() { - global $COUNTRY; - return (!empty($COUNTRY) && $COUNTRY != "NA"); + global $COUNTRY, $COUNTRIES; + return (!empty($COUNTRY) && $COUNTRY != "NA" && isset($COUNTRIES[$COUNTRY])); } /* vim: set noet ts=4 sw=4 ft=php: : */

« previous php.mirrors (#17761) next »