Refactor Model\Contact::addRelationship
- Remove unused parameter $item - Replace q() call with DBA::insert - Update check on $contact that can only be an array now - Add moethod doc block
This commit is contained in:
parent
956ae6241d
commit
3114754f4b
4 changed files with 33 additions and 30 deletions
|
@ -417,13 +417,6 @@ class OStatus
|
|||
$author = self::fetchAuthor($xpath, $entry, $importer, $contact, $stored);
|
||||
}
|
||||
|
||||
$value = XML::getFirstNodeValue($xpath, 'atom:author/poco:preferredUsername/text()', $entry);
|
||||
if ($value != "") {
|
||||
$nickname = $value;
|
||||
} else {
|
||||
$nickname = $author["author-name"];
|
||||
}
|
||||
|
||||
$item = array_merge($header, $author);
|
||||
|
||||
$item["uri"] = XML::getFirstNodeValue($xpath, 'atom:id/text()', $entry);
|
||||
|
@ -463,7 +456,7 @@ class OStatus
|
|||
}
|
||||
|
||||
if ($item["verb"] == ACTIVITY_FOLLOW) {
|
||||
Contact::addRelationship($importer, $contact, $item, $nickname);
|
||||
Contact::addRelationship($importer, $contact, $item);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue