From 7b42789a2fd4ec075e56a1c9f00281bfec8cc94d Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Wed, 8 Sep 2010 20:15:19 +0000 Subject: [PATCH] #905728 wrap GeoRSS tags in FeedsGeoElement class. --- plugins/FeedsSyndicationParser.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/FeedsSyndicationParser.inc b/plugins/FeedsSyndicationParser.inc index e216ff0b..18577b14 100644 --- a/plugins/FeedsSyndicationParser.inc +++ b/plugins/FeedsSyndicationParser.inc @@ -18,7 +18,14 @@ class FeedsSyndicationParser extends FeedsParser { $batch->setDescription($result['description']); $batch->setLink($result['link']); if (is_array($result['items'])) { - $batch->setItems($result['items']); + foreach ($result['items'] as $item) { + if (isset($item['geolocations'])) { + foreach ($item['geolocations'] as $k => $v) { + $item['geolocations'][$k] = new FeedsGeoTermElement($v); + } + } + $batch->addItem($item); + } } } -- GitLab