]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
Merge pull request #3769 from annando/show-forum-posts
[friendica.git] / mod / notifications.php
index bab5fd6274e4ed2c5e47cb849f1195747377beea..95467a584f68df4c600d010aae76847c535fd7b3 100644 (file)
@@ -5,6 +5,9 @@
  * @brief The notifications module
  */
 
+use Friendica\App;
+use Friendica\Core\System;
+
 require_once("include/NotificationsManager.php");
 require_once("include/contact_selectors.php");
 require_once("include/network.php");
@@ -12,7 +15,7 @@ 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);
@@ -223,6 +226,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 +264,7 @@ function notifications_content(App $a) {
                                                '$approve' => t('Approve'),
                                                '$note' => $it['note'],
                                                '$ignore' => t('Ignore'),
-                                               '$discard' => t('Discard'),
+                                               '$discard' => $discard,
 
                                        ));
                                        break;