]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ActivityPub/Featured.php
Use the post language for the language detection / config for quality
[friendica.git] / src / Module / ActivityPub / Featured.php
index 33aabf3a858c0e8cd53004facaf8d32546a92c9b..57934cf3302068b7cb3cbdbf99aed25626c7cf6e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,6 +22,7 @@
 namespace Friendica\Module\ActivityPub;
 
 use Friendica\BaseModule;
+use Friendica\Core\System;
 use Friendica\Model\User;
 use Friendica\Protocol\ActivityPub;
 
@@ -41,11 +42,10 @@ class Featured extends BaseModule
                        throw new \Friendica\Network\HTTPException\NotFoundException();
                }
 
-               $page = $_REQUEST['page'] ?? null;
+               $page = !empty($request['page']) ? (int)$request['page'] : null;
 
-               $outbox = ActivityPub\Transmitter::getFeatured($owner, $page);
-               header('Content-Type: application/activity+json');
-               echo json_encode($outbox);
-               exit();
+               $featured = ActivityPub\Transmitter::getFeatured($owner, $page);
+
+               $this->jsonExit($featured, 'application/activity+json');
        }
 }