mirror of
https://github.com/friendica/friendica
synced 2024-12-22 13:20:15 +00:00
Refactor module Item Display
This commit is contained in:
parent
9422b016d7
commit
e4ec14767f
1 changed files with 3 additions and 2 deletions
|
@ -165,12 +165,13 @@ class Display extends BaseModule
|
|||
*/
|
||||
protected function displaySidebar(array $item)
|
||||
{
|
||||
$author = [];
|
||||
$shared = $this->contentItem->getSharedPost($item, ['author-link']);
|
||||
if (!empty($shared) && empty($shared['comment'])) {
|
||||
if (count($shared) > 0 && !array_key_exists('comment', $shared)) {
|
||||
$author = Contact::getByURLForUser($shared['post']['author-link'], $this->session->getLocalUserId());
|
||||
}
|
||||
|
||||
if (empty($contact)) {
|
||||
if ($author === []) {
|
||||
$author = Contact::getById($item['author-id']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue