diff options
author | Andrew Dolgov <[email protected]> | 2013-02-01 13:09:43 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-02-01 13:09:43 +0400 |
commit | 5b55e9e25cfca0229f1e00aee6a9aee6c1510611 (patch) | |
tree | 3a2c2ca235ae6a596cd095167a12b645c087b7f0 /classes/rpc.php | |
parent | 1e6463fde939a8c18cc7f301b831b21ff673d1e4 (diff) |
js: simplify counter updating, remove some unused stuff
Diffstat (limited to 'classes/rpc.php')
-rw-r--r-- | classes/rpc.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/classes/rpc.php b/classes/rpc.php index d529e496c..5cc2235e8 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -243,20 +243,15 @@ class RPC extends Handler_Protected { $reply = array(); - if ($seq) $reply['seq'] = $seq; + if ($seq) $reply['seq'] = $seq; - if ($last_article_id != getLastArticleId($this->link)) { - $omode = $_REQUEST["omode"]; - - if ($omode != "T") - $reply['counters'] = getAllCounters($this->link, $omode); - else - $reply['counters'] = getGlobalCounters($this->link); - } + if ($last_article_id != getLastArticleId($this->link)) { + $reply['counters'] = getAllCounters($this->link); + } - $reply['runtime-info'] = make_runtime_info($this->link); + $reply['runtime-info'] = make_runtime_info($this->link); - print json_encode($reply); + print json_encode($reply); } /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */ |