cvs: php-master-web /fetch mirrordns.php
| From: | Gabor Hojtsy | Date: | Sat, 21 Dec 2002 12:19:03 +0000 |
| Subject: | cvs: php-master-web /fetch mirrordns.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14374@lists.php.net to get a copy of this message | ||
goba Sat Dec 21 07:19:03 2002 EDT
Modified files:
/php-master-web/fetch mirrordns.php
Log:
Making the code look more clearly (we only had that
firstChar differently in the two ifs)
Index: php-master-web/fetch/mirrordns.php
diff -u php-master-web/fetch/mirrordns.php:1.5 php-master-web/fetch/mirrordns.php:1.6
--- php-master-web/fetch/mirrordns.php:1.5 Mon Dec 16 17:02:50 2002
+++ php-master-web/fetch/mirrordns.php Sat Dec 21 07:19:02 2002
@@ -38,15 +38,15 @@
// The CNAME is an IP
if (preg_match("!^\\d+\\.\\d+\\.\\d+\\.\\d+$!", $row['cname']))
{
- echo '+' . $row['hostname'] . ':' .
$row['cname'] . "\n";
- echo '+www.' . $row['hostname'] . ':' .
$row['cname'] . "\n";
+ $firstChar = '+';
}
// The CNAME is not an IP
- else {
- echo 'C' . $row['hostname'] . ':' .
$row['cname'] . "\n";
- echo 'Cwww.' . $row['hostname'] . ':' .
$row['cname'] . "\n";
- }
+ else { $firstChar = 'C'; }
+
+ // Print out DNS update code
+ echo $firstChar . $row['hostname'] . ':' .
$row['cname'] . "\n";
+ echo $firstChar . 'www.' . $row['hostname'] . ':' .
$row['cname'] . "\n";
}
}
}