[Phphtmllib-devel] SF.net SVN: phphtmllib:[3484] trunk/open2300/lib/modules/api/ AviationWeather.in
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-06-17 03:23:36
|
Revision: 3484 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3484&view=rev Author: hemna Date: 2010-06-17 03:23:30 +0000 (Thu, 17 Jun 2010) Log Message: ----------- fixes Modified Paths: -------------- trunk/open2300/lib/modules/api/AviationWeather.inc Modified: trunk/open2300/lib/modules/api/AviationWeather.inc =================================================================== --- trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-17 03:13:58 UTC (rev 3483) +++ trunk/open2300/lib/modules/api/AviationWeather.inc 2010-06-17 03:23:30 UTC (rev 3484) @@ -62,12 +62,14 @@ $wxInfo["runways"] = $this->get_runways($airport, $wxInfo); $wxInfo["altitude"] = $airport["elevation"]; + if (!isset($airport["details"])) { $info = $this->get_airport_info($icao); + var_dump($info); if (!is_null($info)) { $airport["details"] = 1; $wxInfo = array_merge($wxInfo, $info); - $this->cache->set($airport); + $this->cache->set($icao,$airport); } } @@ -581,14 +583,13 @@ $json = json_decode($raw); echo "\rfetch $icao ".$json->status; var_dump($json); - if ($json->status == 200) { - $info = array("Name" => $info->Name, - "GeonameID" => $info->GeonameID, - "Timezone" => $info->Timezone, - "Latitude" => $info->Latitude, - "Longitude" => $info->Longitude); - var_dump($info); - return $json->Airport; + if ($json->Status == 200) { + $info = array("Name" => $json->Airport->Name, + "GeonameID" => $json->Airport->GeonameID, + "Timezone" => $json->Airport->Timezone, + "Latitude" => $json->Airport->Latitude, + "Longitude" => $json->Airport->Longitude); + return $info; } else { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |