mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-01 05:09:13 +00:00
rpc/updateFeedBrowser: use JSON
This commit is contained in:
@@ -551,25 +551,18 @@
|
||||
}
|
||||
|
||||
if ($subop == "updateFeedBrowser") {
|
||||
header("Content-Type: text/plain");
|
||||
|
||||
$search = db_escape_string($_REQUEST["search"]);
|
||||
$limit = db_escape_string($_REQUEST["limit"]);
|
||||
$mode = db_escape_string($_REQUEST["mode"]);
|
||||
|
||||
print "<rpc-reply>";
|
||||
print "<content>";
|
||||
print "<![CDATA[";
|
||||
$ctr = print_feed_browser($link, $search, $limit, $mode);
|
||||
print "]]>";
|
||||
print "</content>";
|
||||
print "<num-results value=\"$ctr\"/>";
|
||||
print "<mode value=\"$mode\"/>";
|
||||
print "</rpc-reply>";
|
||||
$mode = (int) db_escape_string($_REQUEST["mode"]);
|
||||
|
||||
print json_encode(array("content" =>
|
||||
make_feed_browser($link, $search, $limit, $mode),
|
||||
"mode" => $mode));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($subop == "massSubscribe") {
|
||||
|
||||
$ids = split(",", db_escape_string($_REQUEST["ids"]));
|
||||
@@ -611,12 +604,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
$num_feeds = count($subscribed);
|
||||
|
||||
print "<rpc-reply>";
|
||||
print "<num-feeds value='$num_feeds'/>";
|
||||
print "</rpc-reply>";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user