CVS: phpweather-1.x phpweather.inc,1.3,1.4
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-05-17 15:52:49
|
Update of /cvsroot/phpweather/phpweather-1.x In directory usw-pr-cvs1:/tmp/cvs-serv19910 Modified Files: phpweather.inc Log Message: Fixed problem with newlines - thanks to Mark Liffiton (liffiton) for noticing this. Index: phpweather.inc =================================================================== RCS file: /cvsroot/phpweather/phpweather-1.x/phpweather.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- phpweather.inc 19 Apr 2002 18:08:20 -0000 1.3 +++ phpweather.inc 17 May 2002 15:52:43 -0000 1.4 @@ -10,8 +10,7 @@ */ /* This stores the version number in the variable $version. */ -$version = '1.60'; -$last_modified = '2002-02-05'; +$version = '1.60-CVS'; /* Global variables. You control PHP Weather by setting these. * @@ -531,10 +530,11 @@ /* Here we test to see if we actually got a METAR. */ if (is_array($file)) { - list($i, $date) = each($file); - $date = trim($date); - unset($file[0]); - $metar = trim(implode(' ', $file)); + $date = trim($file[0]); + $metar = trim($file[1]); + for ($i = 2; $i < count($file); $i++) { + $metar .= ' ' . trim($file[i]); + } /* The date is in the form 2000/10/09 14:50 UTC. This seperates the different parts. */ |