mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
Relocate functions in items.php into several classes
This commit is contained in:
parent
3ac1992237
commit
efa8dbcfb3
7 changed files with 304 additions and 285 deletions
|
@ -1037,7 +1037,7 @@ class DFRN
|
|||
XML::addElement($doc, $entry, "dfrn:diaspora_signature", $sign);
|
||||
}
|
||||
|
||||
XML::addElement($doc, $entry, "activity:verb", construct_verb($item));
|
||||
XML::addElement($doc, $entry, "activity:verb", self::constructVerb($item));
|
||||
|
||||
if ($item['object-type'] != "") {
|
||||
XML::addElement($doc, $entry, "activity:object-type", $item['object-type']);
|
||||
|
@ -3073,4 +3073,19 @@ class DFRN
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the activity verb
|
||||
*
|
||||
* @param array $item Item array
|
||||
*
|
||||
* @return string activity verb
|
||||
*/
|
||||
private static function constructVerb(array $item)
|
||||
{
|
||||
if ($item['verb']) {
|
||||
return $item['verb'];
|
||||
}
|
||||
return ACTIVITY_POST;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue