From ba5780c4a1d1337fd5247556cc9b8055d3f98754 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 28 Apr 2017 08:36:10 +0000 Subject: [PATCH] Remove the "discard" button for contact requests from Diaspora. --- mod/notifications.php | 8 +++++++- view/templates/intros.tpl | 2 +- view/theme/frio/templates/intros.tpl | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mod/notifications.php b/mod/notifications.php index bab5fd627..fdaec05cc 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -223,6 +223,12 @@ function notifications_content(App $a) { $header .= " (".network_to_name($it['network'], $it['url']).")"; + if ($it['network'] != NETWORK_DIASPORA) { + $discard = t('Discard'); + } else { + $discard = ''; + } + $notif_content[] = replace_macros($tpl, array( '$header' => htmlentities($header), '$str_notifytype' => t('Notification type: '), @@ -255,7 +261,7 @@ function notifications_content(App $a) { '$approve' => t('Approve'), '$note' => $it['note'], '$ignore' => t('Ignore'), - '$discard' => t('Discard'), + '$discard' => $discard, )); break; diff --git a/view/templates/intros.tpl b/view/templates/intros.tpl index e3933e381..2d0bf9bd0 100644 --- a/view/templates/intros.tpl +++ b/view/templates/intros.tpl @@ -14,7 +14,7 @@
- +{{if $discard}}{{/if}}
diff --git a/view/theme/frio/templates/intros.tpl b/view/theme/frio/templates/intros.tpl index 8fd7ee609..1502a55aa 100644 --- a/view/theme/frio/templates/intros.tpl +++ b/view/theme/frio/templates/intros.tpl @@ -13,7 +13,7 @@
- + {{if $discard}}{{/if}}

{{$fullname}}

@@ -70,7 +70,7 @@
-   + {{if $discard}} {{/if}}