summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-12 20:06:44 +0300
committerAndrew Dolgov <[email protected]>2018-12-12 20:06:44 +0300
commitd53cdaf815c86bf66a5577f575f76831679ed4f2 (patch)
tree5e52ef3ed856f0b2185fb300e5357713bf38ce16 /classes/rpc.php
parent5807f2e0f0ad758b892cc8110ea11f8e7786d6fb (diff)
requestCounters: remove cooldown
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-xclasses/rpc.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index 41325d62a..d40d5ab6a 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -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();
-
- if (!empty($_REQUEST['seq'])) $reply['seq'] = (int) $_REQUEST['seq'];
-
- if ($last_article_id != Article::getLastArticleId()) {
- $reply['counters'] = Counters::getAllCounters();
- }
+ $reply = [
+ 'counters' => Counters::getAllCounters()
+ ];
- $reply['runtime-info'] = make_runtime_info();
+ if ($seq % 2 == 0)
+ $reply['runtime-info'] = make_runtime_info();
print json_encode($reply);
}