]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/ActivityPub/Featured.php
Merge pull request #12227 from matthiasmoritz/public_calendar
[friendica.git] / src / Module / ActivityPub / Featured.php
index 33aabf3a858c0e8cd53004facaf8d32546a92c9b..d525e7d69a82fff9b4a1a468d2a0265ded52e0e9 100644 (file)
@@ -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);
+
+               System::jsonExit($featured, 'application/activity+json');
        }
 }