cvs: php-master-web /scripts ip-to-country
| From: | Gabor Hojtsy | Date: | Thu, 01 Jul 2004 20:26:58 +0000 |
| Subject: | cvs: php-master-web /scripts ip-to-country | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25196@lists.php.net to get a copy of this message | ||
goba Thu Jul 1 16:26:58 2004 EDT
Modified files:
/php-master-web/scripts ip-to-country
Log:
the file gets properly updated, but does not end up on the mirrors
http://cvs.php.net/diff.php/php-master-web/scripts/ip-to-country?r1=1.11&r2=1.12&ty=u
Index: php-master-web/scripts/ip-to-country
diff -u php-master-web/scripts/ip-to-country:1.11 php-master-web/scripts/ip-to-country:1.12
--- php-master-web/scripts/ip-to-country:1.11 Wed Jun 30 16:22:25 2004
+++ php-master-web/scripts/ip-to-country Thu Jul 1 16:26:58 2004
@@ -48,22 +48,16 @@
// the file is expected to be ok
$state = 'firstline'; $fileok = TRUE;
- $DEBUG = "$lastmod";
-
// While we can read a line from the file
while (!feof($ipdbf) && ($line = fgets($ipdbf))) {
- $DEBUG .= 'file read|';
-
// Check the input depending on the state
switch ($state) {
// First line is defined, and after it we
// switch to the 'data' state
case 'firstline' :
- $DEBUG .= 'first line|';
if (trim($line) != "#Directi IP-to-Country Db: Start") {
- $DEBUG .= "bogus first line: $line|";
$fileok = FALSE;
break 2;
} else { $state = 'data'; }
@@ -74,7 +68,6 @@
// which case we write it out to the local rewritten
// database
case 'data' :
- $DEBUG .= 'data line|';
if (trim($line) == "#Directi IP-to-Country Db: End") {
$state = 'lastline';
} elseif (!preg_match("!\\d{20}\\w{3}\n!", $line)) {
@@ -88,7 +81,6 @@
// We should not receive any data after the last
// line, only whitespace is allowed
case 'lastline' :
- $DEBUG .= 'last line|';
if (strlen(trim($line)) > 0) {
$fileok = FALSE;
break 2;
@@ -99,13 +91,6 @@
fclose($ipdbf);
fclose($ipdbcf);
- if ($fileok) {
- mail("goba@php.net", "ip-to-country: proper format", $DEBUG);
- }
- else {
- mail("goba@php.net", "ip-to-country: improper format", $DEBUG);
- }
-
// Remove the temp file. If the data is ok, move
// it to the destination, or else delete that too
unlink($ipdbt);