X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=8bc9a76c388efcaef89d1c787579d6a68a047700;hb=80f81e670c721067cddf0ffff4ed4f2def1ad69c;hp=54c54fa222b00009b4390bb5d23710ed6d5391f5;hpb=8821d33f73785884cfce83e7b23d3ef19cc1bc11;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 54c54fa222..8bc9a76c38 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -92,6 +92,8 @@ function notifications_content(App $a) $notif_header = L10n::t('Notifications'); + $all = false; + // Get introductions if ((($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) { Nav::setSelected('introductions'); @@ -119,6 +121,9 @@ function notifications_content(App $a) } elseif (($a->argc > 1) && ($a->argv[1] == 'home')) { $notif_header = L10n::t('Home Notifications'); $notifs = $nm->homeNotifs($show, $startrec, $perpage); + // fallback - redirect to main page + } else { + $a->internalRedirect('notifications'); } // Set the pager @@ -221,6 +226,14 @@ function notifications_content(App $a) '$as_fan' => (($notif['network'] == Protocol::DIASPORA) ? L10n::t('Sharer') : L10n::t('Subscriber')) ]); + $contact = DBA::selectFirst('contact', ['network', 'protocol'], ['id' => $notif['contact_id']]); + + if (($contact['network'] != Protocol::DFRN) || ($contact['protocol'] == Protocol::ACTIVITYPUB)) { + $action = 'follow_confirm'; + } else { + $action = 'dfrn_confirm'; + } + $header = $notif['name']; if ($notif['addr'] != '') { @@ -237,7 +250,7 @@ function notifications_content(App $a) $notif_content[] = Renderer::replaceMacros($tpl, [ '$type' => $notif['label'], - '$header' => htmlentities($header), + '$header' => $header, '$str_notifytype' => L10n::t('Notification type:'), '$notify_type' => $notif['notify_type'], '$dfrn_text' => $dfrn_text, @@ -268,6 +281,7 @@ function notifications_content(App $a) '$note' => $notif['note'], '$ignore' => L10n::t('Ignore'), '$discard' => $discard, + '$action' => $action, ]); break; }