]> git.mxchange.org Git - friendica.git/blobdiff - mod/notice.php
Replace System::httpExit() by HTTPException throwing
[friendica.git] / mod / notice.php
index 199c6d1b5d59dff1eeec553de8e6a8c271e4167f..b0a6a543912d71e656ed0b403695a293b4654fa7 100644 (file)
@@ -6,7 +6,6 @@
 
 use Friendica\App;
 use Friendica\Core\L10n;
-use Friendica\Core\System;
 use Friendica\Database\DBA;
 
 function notice_init(App $a)
@@ -15,10 +14,9 @@ function notice_init(App $a)
        $r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id));
        if (DBA::isResult($r)) {
                $nick = $r[0]['nickname'];
-               $a->redirect('display/' . $nick . '/' . $id);
+               $a->internalRedirect('display/' . $nick . '/' . $id);
        } else {
-               $a->error = 404;
-               notice(L10n::t('Item not found.') . EOL);
+               throw new \Friendica\Network\HTTPException\NotFoundException(L10n::t('Item not found.'));
        }
 
        return;