]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ParseUrl.php
Issue 11566: More detailled notification configuration
[friendica.git] / src / Module / ParseUrl.php
index 0b1548ed5ef4f00964fb71e3308818f019b12d04..91d09240b7e6d39e5b530f3c28fc10643ba17915 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -31,7 +31,7 @@ use Friendica\Util;
 
 class ParseUrl extends BaseModule
 {
-       public static function rawContent(array $parameters = [])
+       protected function rawContent(array $request = [])
        {
                if (!Session::isAuthenticated()) {
                        throw new \Friendica\Network\HTTPException\ForbiddenException();
@@ -88,8 +88,7 @@ class ParseUrl extends BaseModule
                        if ($format == 'json') {
                                System::jsonExit($arr['text']);
                        } else {
-                               echo $arr['text'];
-                               exit();
+                               System::httpExit($arr['text']);
                        }
                }
 
@@ -122,8 +121,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'] ?? ''));
                }
        }
 }