Completely removed argc/argv

This commit is contained in:
Michael 2021-07-25 15:23:37 +00:00
parent 540ddb9265
commit df558d4056
18 changed files with 70 additions and 114 deletions

View file

@ -48,15 +48,10 @@ class Feed extends BaseModule
$last_update = $_GET['last_update'] ?? '';
$nocache = !empty($_GET['nocache']) && local_user();
// @TODO: Replace with parameter from router
if ($a->argc < 2) {
throw new \Friendica\Network\HTTPException\BadRequestException();
}
$type = null;
// @TODO: Replace with parameter from router
if ($a->argc > 2) {
$type = $a->argv[2];
if (DI::args()->getArgc() > 2) {
$type = DI::args()->getArgv()[2];
}
switch ($type) {
@ -72,10 +67,8 @@ class Feed extends BaseModule
$type = 'posts';
}
// @TODO: Replace with parameter from router
$nickname = $a->argv[1];
header("Content-type: application/atom+xml; charset=utf-8");
echo ProtocolFeed::atom($nickname, $last_update, 10, $type, $nocache, true);
echo ProtocolFeed::atom($parameters['nickname'], $last_update, 10, $type, $nocache, true);
exit();
}
}