Permalink
Browse files

make that atom stuff more generic

  • Loading branch information...
1 parent 2836462 commit fecda37315d3ab685fd172ec4f5757630273b1be @chregu committed Jun 3, 2009
Showing with 14 additions and 1 deletion.
  1. +14 −1 libs/aggregator.php
View
@@ -48,7 +48,13 @@ function aggregateAllBlogs($id = null) {
continue;
}
//check if this blog already exists
-
+ if (isset($feed->channel['atom'])) {
+ foreach($feed->channel['atom'] as $k => $v) {
+ if (!isset($feed->channel[$k])) {
+ $feed->channel[$k] = $v;
+ }
+ }
+ }
if (!$feed->channel['link']) {
if (isset($feed->channel['link_'])) {
$feed->channel['link'] = $feed->channel['link_'];
@@ -83,6 +89,13 @@ function aggregateAllBlogs($id = null) {
//loop through feeds
foreach ($feed->items as $item) {
+ if (isset($item['atom']) && is_array($item['atom'])) {
+ foreach($item['atom'] as $k => $v) {
+ if (!isset($item[$k])) {
+ $item[$k] = $v;
+ }
+ }
+ }
if (!isset($item['link']) && isset($item['link_'])) {
$item['link'] = $item['link_'];
}

0 comments on commit fecda37

Please sign in to comment.