]> git.wh0rd.org - tt-rss.git/blobdiff - classes/rpc.php
js: simplify counter updating, remove some unused stuff
[tt-rss.git] / classes / rpc.php
index 0e6fa3379e8514f9319d66bcb8327ebe57244afb..5cc2235e8188eedefb448a285aaf2a116aaee46a 100644 (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 ($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 */
@@ -370,7 +365,7 @@ class RPC extends Handler_Protected {
                $this->update_feed_access_key($this->link, 'OPML:Publish',
                false, $_SESSION["uid"]);
 
-               $new_link = opml_publish_url($this->link);
+               $new_link = Opml::opml_publish_url($this->link);
 
                print json_encode(array("link" => $new_link));
        }