Bugfix: The nickname vanished/better way to fetch the alias
This commit is contained in:
parent
e5377a5e91
commit
b4b62493e6
4 changed files with 23 additions and 8 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue