Update of /cvsroot/phpweather/phpweather
In directory usw-pr-cvs1:/tmp/cvs-serv14233
Modified Files:
db_updater.php
Log Message:
Ugh! This is kinda ugly - when I run this at SourceForge, then the
script isn't included in $argv - when I run this on my machine, the
first entry in $argv is the filename the script was invoked as...
Let's just call this a temporary fix :-)
Index: db_updater.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db_updater.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- db_updater.php 25 Mar 2002 19:39:05 -0000 1.1
+++ db_updater.php 25 Mar 2002 20:11:19 -0000 1.2
@@ -9,9 +9,17 @@
}
-if (!empty($filename) && file_exists($filename)) {
+if (!empty($filename) &&
+ file_exists($filename) &&
+ ereg('[012][0-9]Z.TXT', $filename) {
$fn = $filename;
-} else if (!empty($argv[1]) && file_exists($argv[1])) {
+} else if (!empty($argv[0]) &&
+ file_exists($argv[0]) &&
+ ereg('[012][0-9]Z.TXT', $filename)) {
+ $fn = $argv[0];
+} else if (!empty($argv[1]) &&
+ file_exists($argv[1]) &&
+ ereg('[012][0-9]Z.TXT', $filename)) {
$fn = $argv[1];
} else {
print_usage();
|