X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FParseUrl.php;h=8353cdf6d6713a9cb2bff393b8fcc98f36d7fcf0;hb=99284222c1d7fb4adca9077e3057faf3b36f7180;hp=0b1548ed5ef4f00964fb71e3308818f019b12d04;hpb=befc2af5043a3afde251721c0d27df695db1bb7e;p=friendica.git diff --git a/src/Module/ParseUrl.php b/src/Module/ParseUrl.php index 0b1548ed5e..8353cdf6d6 100644 --- a/src/Module/ParseUrl.php +++ b/src/Module/ParseUrl.php @@ -1,6 +1,6 @@ userSession = $userSession; + } + + protected function rawContent(array $request = []) { - if (!Session::isAuthenticated()) { + if (!$this->userSession->isAuthenticated()) { throw new \Friendica\Network\HTTPException\ForbiddenException(); } @@ -88,8 +102,7 @@ class ParseUrl extends BaseModule if ($format == 'json') { System::jsonExit($arr['text']); } else { - echo $arr['text']; - exit(); + System::httpExit($arr['text']); } } @@ -122,8 +135,7 @@ class ParseUrl extends BaseModule System::jsonExit($ret); } else { - echo BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? ''); - exit(); + System::httpExit(BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? '')); } } }