1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

requestCounters: remove cooldown

This commit is contained in:
Andrew Dolgov
2018-12-12 20:06:44 +03:00
parent 5807f2e0f0
commit d53cdaf815
4 changed files with 10 additions and 34 deletions

View File

@@ -271,17 +271,14 @@ class RPC extends Handler_Protected {
}
function getAllCounters() {
$last_article_id = (int) clean($_REQUEST["last_article_id"]);
@$seq = (int) $_REQUEST['seq'];
$reply = array();
$reply = [
'counters' => Counters::getAllCounters()
];
if (!empty($_REQUEST['seq'])) $reply['seq'] = (int) $_REQUEST['seq'];
if ($last_article_id != Article::getLastArticleId()) {
$reply['counters'] = Counters::getAllCounters();
}
$reply['runtime-info'] = make_runtime_info();
if ($seq % 2 == 0)
$reply['runtime-info'] = make_runtime_info();
print json_encode($reply);
}