mirror of
https://github.com/friendica/friendica
synced 2025-04-24 11:10:18 +00:00
Completely removed argc/argv
This commit is contained in:
parent
540ddb9265
commit
df558d4056
18 changed files with 70 additions and 114 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue