mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Quote share counter added
This commit is contained in:
parent
1dd48e4a8b
commit
1972762500
4 changed files with 181 additions and 127 deletions
|
@ -594,6 +594,7 @@ class Post
|
|||
'like_html' => $responses['like']['output'],
|
||||
'dislike_html' => $responses['dislike']['output'],
|
||||
'emojis' => $emojis,
|
||||
'quoteshares' => $this->getQuoteShares($item['quoteshares']),
|
||||
'reactions' => $reactions,
|
||||
'responses' => $responses,
|
||||
'switchcomment' => DI::l10n()->t('Comment'),
|
||||
|
@ -742,6 +743,21 @@ class Post
|
|||
return $emojis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch quote shares
|
||||
*
|
||||
* @param array $quoteshares
|
||||
* @return array
|
||||
*/
|
||||
private function getQuoteShares($quoteshares)
|
||||
{
|
||||
if (empty($quoteshares)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return ['total' => $quoteshares['total'], 'title' => DI::l10n()->t('Quoted shared by: %s', implode(', ', $quoteshares['title']))];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return integer
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue