]> git.mxchange.org Git - friendica.git/blobdiff - mod/notify.php
Merge pull request #7095 from annando/ap-connect
[friendica.git] / mod / notify.php
index b7e2faf1c98ad722f39e5517246393520d87c342..7f9974d30a1e5737b1d61ddc4dd089a29641c70e 100644 (file)
@@ -26,18 +26,6 @@ function notify_init(App $a)
                $note = $nm->getByID($a->argv[2]);
                if ($note) {
                        $nm->setSeen($note);
-
-                       // The friendica client has problems with the GUID. this is some workaround
-                       if ($a->isFriendicaApp()) {
-                               require_once("include/items.php");
-                               $urldata = parse_url($note['link']);
-                               $guid = basename($urldata["path"]);
-                               $itemdata = Item::getIdAndNickByGuid($guid, local_user());
-                               if ($itemdata["id"] != 0) {
-                                       $note['link'] = System::baseUrl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
-                               }
-                       }
-
                        System::externalRedirect($note['link']);
                }
 
@@ -48,7 +36,7 @@ function notify_init(App $a)
                $r = $nm->setAllSeen();
                $j = json_encode(['result' => ($r) ? 'success' : 'fail']);
                echo $j;
-               killme();
+               exit();
        }
 }
 
@@ -58,11 +46,13 @@ function notify_content(App $a)
                return Login::form();
        }
 
+       $notif_content = '';
+
        $nm = new NotificationsManager();
 
-       $notif_tpl = get_markup_template('notifications.tpl');
+       $notif_tpl = Renderer::getMarkupTemplate('notifications.tpl');
 
-       $not_tpl = get_markup_template('notify.tpl');
+       $not_tpl = Renderer::getMarkupTemplate('notify.tpl');
 
        $r = $nm->getAll(['seen'=>0]);
        if (DBA::isResult($r) > 0) {