mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 03:41:29 +00:00
misc generated feed tweaks (fix json content-type, etc)
This commit is contained in:
@@ -106,7 +106,11 @@ class Handler_Public extends Handler {
|
||||
$tpl->addBlock('feed');
|
||||
$tpl->generateOutputToString($tmp);
|
||||
|
||||
if (@!$_REQUEST["noxml"]) {
|
||||
header("Content-Type: text/xml; charset=utf-8");
|
||||
} else {
|
||||
header("Content-Type: text/plain; charset=utf-8");
|
||||
}
|
||||
|
||||
print $tmp;
|
||||
} else if ($format == 'json') {
|
||||
@@ -165,8 +169,7 @@ class Handler_Public extends Handler {
|
||||
array_push($feed['articles'], $article);
|
||||
}
|
||||
|
||||
header("Content-Type: text/plain; charset=utf-8");
|
||||
|
||||
header("Content-Type: text/json; charset=utf-8");
|
||||
print json_encode($feed);
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user