X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=e2de81e6c7f24a7f49dfe41602298fbe7c1d0b10;hb=c54a2c1e83822f6e043b449468570d2c9ed3ab3a;hp=0c08b66ce0459d9b83fbb8bea5a3b760221f79ad;hpb=b6a4a2ec7fcf7d9f28b0b0fdd9bc2ad2cdba2b3c;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 0c08b66ce0..e2de81e6c7 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -1,18 +1,20 @@ argc > 1) ? $a->argv[1] : 0); @@ -27,7 +29,7 @@ function notifications_post(App $a) { intval(local_user()) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $intro_id = $r[0]['id']; $contact_id = $r[0]['contact-id']; } @@ -221,7 +223,13 @@ function notifications_content(App $a) { if ($it["addr"] != "") $header .= " <".$it["addr"].">"; - $header .= " (".network_to_name($it['network'], $it['url']).")"; + $header .= " (".ContactSelector::networkToName($it['network'], $it['url']).")"; + + if ($it['network'] != NETWORK_DIASPORA) { + $discard = t('Discard'); + } else { + $discard = ''; + } $notif_content[] = replace_macros($tpl, array( '$header' => htmlentities($header), @@ -250,12 +258,12 @@ function notifications_content(App $a) { '$addr' => $it['addr'], '$lbl_knowyou' => $lbl_knowyou, '$lbl_network' => t('Network:'), - '$network' => network_to_name($it['network'], $it['url']), + '$network' => ContactSelector::networkToName($it['network'], $it['url']), '$knowyou' => $knowyou, '$approve' => t('Approve'), '$note' => $it['note'], '$ignore' => t('Ignore'), - '$discard' => t('Discard'), + '$discard' => $discard, )); break; @@ -292,7 +300,7 @@ function notifications_content(App $a) { '$item_link' => $it['link'], '$item_image' => $it['image'], '$item_url' => $it['url'], - '$item_text' => htmlentities($it['text']), + '$item_text' => $it['text'], '$item_when' => $it['when'], '$item_ago' => $it['ago'], '$item_seen' => $it['seen'],