Skip to content

Commit

Permalink
Make sure we have the full station object.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 28, 2014
1 parent 7914f44 commit e100058
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/Service_Weather/lib/Horde/Service/Weather/Wwo.php
Expand Up @@ -181,12 +181,14 @@ protected function _getCommonElements($location, $length = Horde_Service_Weather
'q' => $location,
'num_of_days' => $length,
'includeLocation' => 'yes',
'timezone' => 'yes',
'extra' => 'localObsTime'));

$results = $this->_makeRequest($url);
$station = $this->_parseStation($results->data->nearest_area[0]);

// Current conditions
// Wwo doesn't include the full station data in the forecast/conditions
// response. Request it.
$station = $this->searchLocations($station->lat . ',' . $station->lon);
$this->_current = $this->_parseCurrent($results->data->current_condition);

// Sunrise/Sunset
Expand Down

0 comments on commit e100058

Please sign in to comment.