1
0
Fork 0

Bugfix: The nickname vanished/better way to fetch the alias

This commit is contained in:
Michael Vogel 2016-04-02 15:41:55 +02:00 committed by Roland Haeder
commit 0c6ff4202d
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
4 changed files with 23 additions and 8 deletions

View 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();