1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 19:05:55 +00:00

js: simplify counter updating, remove some unused stuff

This commit is contained in:
Andrew Dolgov
2013-02-01 13:09:43 +04:00
parent 1e6463fde9
commit 5b55e9e25c
6 changed files with 44 additions and 145 deletions

View File

@@ -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 ($last_article_id != getLastArticleId($this->link)) {
$reply['counters'] = getAllCounters($this->link);
}
if ($omode != "T")
$reply['counters'] = getAllCounters($this->link, $omode);
else
$reply['counters'] = getGlobalCounters($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 */