From d675ed5a29bdc9d8fdc1cd20d97e17bc33e7c1f4 Mon Sep 17 00:00:00 2001 From: Eric Kennedy Date: Tue, 5 Sep 2006 18:37:56 +0000 Subject: [PATCH] Fixed WeatherData.pm. NOAA had changed the format of their output causing REGEXP to fail. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/WeatherData.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 713b598be..f1a60c265 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -38,6 +38,7 @@ - fix: CS pagination does not work for visitors - fixed a problem in the search indexer and made the tabform css compatible with tinymce. (Martin Kamerbeek / Procolix) + - fixed WeatherData Wobject, noaa format had changed (ekennedy) 7.0.6 - fix: Error in DateTime.pm diff --git a/lib/WebGUI/Asset/Wobject/WeatherData.pm b/lib/WebGUI/Asset/Wobject/WeatherData.pm index 4e4aee1b2..4763be45b 100644 --- a/lib/WebGUI/Asset/Wobject/WeatherData.pm +++ b/lib/WebGUI/Asset/Wobject/WeatherData.pm @@ -97,7 +97,7 @@ sub _getLocationData { my $document = $response->content; $document =~ s/\n/ /g; $document =~ s/\s+/ /g; - $document =~ m!
\s\s(.*?)
.*?
.*?
.*?
\s(.*?):\s(.*?) °F
!; + $document =~ m!\s(.*?)
.*?
.*?
.*?
\s(.*?):\s(.*?) °F
!; $locData = { query => $location, cityState => $1 || $location,