1
0
Fork 0

Add missing post keys to retrieve pLink in Model\Event::prepareListForTemplate()

- Address https://github.com/friendica/friendica/issues/11632#issuecomment-1275117722
This commit is contained in:
Hypolite Petovan 2022-10-11 22:08:54 -04:00
parent ec9059c395
commit 0480d9aebd

View file

@ -580,7 +580,7 @@ class Event
$last_date = ''; $last_date = '';
$fmt = DI::l10n()->t('l, F j'); $fmt = DI::l10n()->t('l, F j');
foreach ($event_result as $event) { foreach ($event_result as $event) {
$item = Post::selectFirst(['plink', 'author-name', 'author-avatar', 'author-link', 'private', 'uri-id'], ['id' => $event['itemid']]); $item = Post::selectFirst(['plink', 'author-name', 'author-network', 'author-id', 'author-avatar', 'author-link', 'private', 'uri-id'], ['id' => $event['itemid']]);
if (!DBA::isResult($item)) { if (!DBA::isResult($item)) {
// Using default values when no item had been found // Using default values when no item had been found
$item = ['plink' => '', 'author-name' => '', 'author-avatar' => '', 'author-link' => '', 'private' => Item::PUBLIC, 'uri-id' => ($event['uri-id'] ?? 0)]; $item = ['plink' => '', 'author-name' => '', 'author-avatar' => '', 'author-link' => '', 'private' => Item::PUBLIC, 'uri-id' => ($event['uri-id'] ?? 0)];