]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
adding desaturation and transition for forumlist widget
[friendica.git] / mod / notifications.php
index 54c54fa222b00009b4390bb5d23710ed6d5391f5..8bc9a76c388efcaef89d1c787579d6a68a047700 100644 (file)
@@ -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;
                        }