mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-30 13:37:11 +00:00
js: simplify counter updating, remove some unused stuff
This commit is contained in:
@@ -104,11 +104,7 @@ class API extends Handler {
|
||||
|
||||
/* Method added for ttrss-reader for Android */
|
||||
function getCounters() {
|
||||
|
||||
/* flct (flc is the default) FIXME: document */
|
||||
$output_mode = db_escape_string($_REQUEST["output_mode"]);
|
||||
|
||||
print $this->wrap(self::STATUS_OK, getAllCounters($this->link, $output_mode));
|
||||
print $this->wrap(self::STATUS_OK, getAllCounters($this->link));
|
||||
}
|
||||
|
||||
function getFeeds() {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user