]> git.mxchange.org Git - friendica.git/blobdiff - include/feed.php
rework autocomplete: space after inserting contact without id
[friendica.git] / include / feed.php
index 04cfba75a69fc407cf610725e26a70a832d843a2..293de3cc965ed6b892599db7edd17c5aad6e12d4 100644 (file)
@@ -54,8 +54,10 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
                                if ($attributes->name == "href")
                                        $author["author-link"] = $attributes->textContent;
 
+               $author["author-id"] = $xpath->evaluate('/atom:feed/atom:author/atom:uri/text()')->item(0)->nodeValue;
+
                if ($author["author-link"] == "")
-                       $author["author-link"] = $xpath->evaluate('/atom:feed/atom:author/atom:uri/text()')->item(0)->nodeValue;
+                       $author["author-link"] = $author["author-id"];
 
                if ($author["author-link"] == "") {
                        $self = $xpath->query("atom:link[@rel='self']")->item(0)->attributes;
@@ -127,6 +129,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
 
                // This is no field in the item table. So we have to unset it.
                unset($author["author-nick"]);
+               unset($author["author-id"]);
        }
 
        $header = array();