Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

check for link_html tags as well (before id) to make blogspot atom p…

…osts parse correctly
  • Loading branch information...
commit 540086ec01ba2ceef3e5f52f27fa43b10d8f15d8 1 parent c5c2217
Christian Stocker authored March 12, 2012

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. 9  libs/aggregator.php
9  libs/aggregator.php
@@ -57,7 +57,6 @@ function aggregateAllBlogs($id = null) {
57 57
                        }
58 58
                }     
59 59
                    
60  
-                   var_dump($feed->channel);
61 60
               if ($feed->channel['link_html']) {
62 61
                    $feed->channel['link'] = $feed->channel['link_html'];
63 62
 		} else {
@@ -109,9 +108,17 @@ function aggregateAllBlogs($id = null) {
109 108
                 if (!isset($item['link']) && isset($item['link_'])) {
110 109
                     $item['link'] = $item['link_'];
111 110
                 }
  111
+                if (!isset($item['link']) && isset($item['link_html'])) {
  112
+                    $item['link'] = $item['link_html'];
  113
+                }
112 114
                 if (!isset($item['link']) && isset($item['id'])) {
113 115
                     $item['link'] = $item['id'];
114 116
                 }
  117
+
  118
+                if (strpos($item['link'],"http") !== 0) {
  119
+                   print "ERROR, item link " . $item['link'] . " doesn't start with http\n";
  120
+                    continue;
  121
+                }
115 122
                 if (!isset($item['content']['encoded']) && isset($item['atom_content'])) {
116 123
                     $item['content']['encoded'] = $item['atom_content'];
117 124
                 }

0 notes on commit 540086e

Please sign in to comment.
Something went wrong with that request. Please try again.