]> git.mxchange.org Git - friendica.git/commitdiff
Fixed subscription problem with new GNU Social.
authorMats Sjöberg <root@saz.im>
Thu, 21 Nov 2013 18:40:46 +0000 (19:40 +0100)
committerMats Sjöberg <root@saz.im>
Thu, 21 Nov 2013 18:41:06 +0000 (19:41 +0100)
include/network.php

index 3bf2626424ca546f1f3dd65fe060716709f6bb7a..a4538e88ed79a92d54fc0182b150c6cfaad264b0 100644 (file)
@@ -549,7 +549,7 @@ function fetch_lrdd_template($host) {
        }
        if(count($links)) {
                foreach($links as $link)
-                       if($link['@attributes']['rel'] && $link['@attributes']['rel'] === 'lrdd')
+                       if($link['@attributes']['rel'] && $link['@attributes']['rel'] === 'lrdd' && (!$link['@attributes']['type'] || $link['@attributes']['type'] === 'application/xrd+xml'))
                                $tpl = $link['@attributes']['template'];
        }
        if(! strpos($tpl,'{uri}'))
@@ -566,7 +566,7 @@ function fetch_xrd_links($url) {
 
        $xrd_timeout = intval(get_config('system','xrd_timeout'));
        $redirects = 0;
-       $xml = fetch_url($url,false,$redirects,(($xrd_timeout) ? $xrd_timeout : 20));
+       $xml = fetch_url($url,false,$redirects,(($xrd_timeout) ? $xrd_timeout : 20), "application/xrd+xml");
 
        logger('fetch_xrd_links: ' . $xml, LOGGER_DATA);