$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];
}
case 'posts':
case 'comments':
case 'activity':
+ // Correct type names, no change needed
break;
case 'replies':
$type = 'comments';
$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();
}
}