mirror of
https://github.com/friendica/friendica
synced 2025-04-19 07:10:11 +00:00
function moved
This commit is contained in:
parent
bfddf14b6b
commit
0e5f876680
2 changed files with 39 additions and 35 deletions
|
@ -314,33 +314,4 @@ class BaseApi extends BaseModule
|
|||
|
||||
return $cid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set values for RSS template
|
||||
*
|
||||
* @param array $arr Array to be passed to template
|
||||
* @param int $cid Contact ID of template
|
||||
* @return array
|
||||
*/
|
||||
public static function addRSSValues(array $arr, int $cid)
|
||||
{
|
||||
if (empty($cid)) {
|
||||
return $arr;
|
||||
}
|
||||
|
||||
$user_info = DI::twitterUser()->createFromContactId($cid)->toArray();
|
||||
|
||||
$arr['$user'] = $user_info;
|
||||
$arr['$rss'] = [
|
||||
'alternate' => $user_info['url'],
|
||||
'self' => DI::baseUrl() . '/' . DI::args()->getQueryString(),
|
||||
'base' => DI::baseUrl(),
|
||||
'updated' => DateTimeFormat::utc(null, DateTimeFormat::API),
|
||||
'atom_updated' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
||||
'language' => $user_info['lang'],
|
||||
'logo' => DI::baseUrl() . '/images/friendica-32.png',
|
||||
];
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue