]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix feed discovery: html:link@rel can contain multiple values; saw rel="updates alter...
authorBrion Vibber <brion@pobox.com>
Mon, 15 Mar 2010 20:26:42 +0000 (20:26 +0000)
committerBrion Vibber <brion@pobox.com>
Mon, 15 Mar 2010 20:26:42 +0000 (20:26 +0000)
plugins/OStatus/lib/feeddiscovery.php

index ff76b229e76923030f0d56242bb4467024b93dbf..7761ea583adb505c2446fbe6c12753db20d0ad7f 100644 (file)
@@ -211,11 +211,11 @@ class FeedDiscovery
                 $type = $node->attributes->getNamedItem('type');
                 $href = $node->attributes->getNamedItem('href');
                 if ($rel && $type && $href) {
-                    $rel = trim($rel->value);
+                    $rel = array_filter(explode(" ", $rel->value));
                     $type = trim($type->value);
                     $href = trim($href->value);
 
-                    if (trim($rel) == 'alternate' && array_key_exists($type, $feeds) && empty($feeds[$type])) {
+                    if (in_array('alternate', $rel) && array_key_exists($type, $feeds) && empty($feeds[$type])) {
                         // Save the first feed found of each type...
                         $feeds[$type] = $this->resolveURI($href, $base);
                     }