X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FParseUrl.php;h=6620229cd16c78fcb6114d710d7d413ff70b493c;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=092d6ec747bd0ac96cf495757c4f3bad7a60a6ff;hpb=4208535c16f0e8196effe230cc34141551a7be18;p=friendica.git diff --git a/src/Module/ParseUrl.php b/src/Module/ParseUrl.php index 092d6ec747..6620229cd1 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(); } @@ -86,10 +100,9 @@ class ParseUrl extends BaseModule if ($arr['text']) { if ($format == 'json') { - System::jsonExit($arr['text']); + $this->jsonExit($arr['text']); } else { - echo $arr['text']; - exit(); + $this->httpExit($arr['text']); } } @@ -120,10 +133,9 @@ class ParseUrl extends BaseModule $ret['success'] = true; } - System::jsonExit($ret); + $this->jsonExit($ret); } else { - echo BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? ''); - exit(); + $this->httpExit(BBCode::embedURL($url, empty($_GET['noAttachment']), $title, $description, $_GET['tags'] ?? '')); } } }