Update of /cvsroot/phpweather/phpweather/db
In directory usw-pr-cvs1:/tmp/cvs-serv27802
Modified Files:
pw_db_common.php
Log Message:
The reports might be duplicated in the cycle files, and two reports
might even have the same timestamp. This should make sure, that the
newest report (the one furthest down in the file) overwrites any
previous reports.
Index: pw_db_common.php
===================================================================
RCS file: /cvsroot/phpweather/phpweather/db/pw_db_common.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- pw_db_common.php 26 Mar 2002 00:11:04 -0000 1.9
+++ pw_db_common.php 26 Mar 2002 17:37:58 -0000 1.10
@@ -104,7 +104,7 @@
$icao = substr($metar, 0, 4);
if (list($m, $t) = $this->get_metar($icao)) {
- if ($t < $timestamp) {
+ if ($t <= $timestamp) {
/* The METAR in the database is older than the new METAR, so
* we go ahead with the update: */
$this->update_metar($icao, addslashes($metar), $timestamp);
|