X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=fe8422cc4a80a31460923c07fd44dc257893675d;hb=de4a2e6fd03cd0aab94a256eba92ed593931534b;hp=0c08b66ce0459d9b83fbb8bea5a3b760221f79ad;hpb=a7e8e868008426adb858d7fb2010f2ced6ab2699;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 0c08b66ce0..fe8422cc4a 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -5,14 +5,18 @@ * @brief The notifications module */ -require_once("include/NotificationsManager.php"); +use Friendica\App; +use Friendica\Core\NotificationsManager; +use Friendica\Core\System; +use Friendica\Database\DBM; + require_once("include/contact_selectors.php"); require_once("include/network.php"); function notifications_post(App $a) { if (! local_user()) { - goaway(z_root()); + goaway(System::baseUrl()); } $request_id = (($a->argc > 1) ? $a->argv[1] : 0); @@ -27,7 +31,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']; } @@ -223,6 +227,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 +265,7 @@ function notifications_content(App $a) { '$approve' => t('Approve'), '$note' => $it['note'], '$ignore' => t('Ignore'), - '$discard' => t('Discard'), + '$discard' => $discard, )); break; @@ -292,7 +302,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'],