X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FFeed.php;h=15b2026e2c246559668a4e30df495e8a811280d0;hb=151c026a8aa5991c8f73b0974f479732c482cc45;hp=4c7059c038dc0bb221699f4c3840dcad3606f2bf;hpb=5e60fa8210b502797209de770780d6d7ba81b86c;p=friendica.git diff --git a/src/Module/Feed.php b/src/Module/Feed.php index 4c7059c038..15b2026e2c 100644 --- a/src/Module/Feed.php +++ b/src/Module/Feed.php @@ -3,7 +3,6 @@ namespace Friendica\Module; use Friendica\BaseModule; -use Friendica\Core\System; use Friendica\Protocol\OStatus; /** @@ -31,11 +30,13 @@ class Feed extends BaseModule $last_update = defaults($_GET, 'last_update', ''); $nocache = !empty($_GET['nocache']) && local_user(); + // @TODO: Replace with parameter from router if ($a->argc < 2) { - System::httpExit(400); + throw new \Friendica\Network\HTTPException\BadRequestException(); } $type = null; + // @TODO: Replace with parameter from router if ($a->argc > 2) { $type = $a->argv[2]; } @@ -44,6 +45,7 @@ class Feed extends BaseModule case 'posts': case 'comments': case 'activity': + // Correct type names, no change needed break; case 'replies': $type = 'comments'; @@ -52,9 +54,10 @@ class Feed extends BaseModule $type = 'posts'; } + // @TODO: Replace with parameter from router $nickname = $a->argv[1]; - header("Content-type: application/atom+xml"); + header("Content-type: application/atom+xml; charset=utf-8"); echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true); - killme(); + exit(); } }