From 5b55e9e25cfca0229f1e00aee6a9aee6c1510611 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Feb 2013 13:09:43 +0400 Subject: js: simplify counter updating, remove some unused stuff --- classes/api.php | 6 +----- classes/rpc.php | 17 ++++++----------- 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'classes') diff --git a/classes/api.php b/classes/api.php index 9b9a5bbe5..a4294e026 100644 --- a/classes/api.php +++ b/classes/api.php @@ -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() { 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 */ -- cgit v1.2.3