Fix introductions notifications links
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 11 Sep 2018 23:54:45 +0000 (19:54 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 11 Sep 2018 23:54:45 +0000 (19:54 -0400)
mod/notifications.php

index acd49de..3934a32 100644 (file)
@@ -132,6 +132,11 @@ function notifications_content(App $a)
 
        $notif_tpl = get_markup_template('notifications.tpl');
 
+       $notif_show_lnk = [
+               'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ),
+               'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
+       ];
+
        // Process the data for template creation
        if (defaults($notifs, 'ident', '') === 'introductions') {
                $sugg = get_markup_template('suggestions.tpl');
@@ -303,11 +308,6 @@ function notifications_content(App $a)
                $notif_nocontent = L10n::t('No more %s notifications.', $notifs['ident']);
        }
 
-       $notif_show_lnk = [
-               'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ),
-               'text' => ($show ? L10n::t('Show unread') : L10n::t('Show all')),
-       ];
-
        $o .= replace_macros($notif_tpl, [
                '$notif_header'    => $notif_header,
                '$tabs'            => $tabs,