From 773adf8b424b0b6e8b871c23a44afff0ed177cc0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Nov 2010 19:18:13 +0300 Subject: [PATCH] unify backend methods updateAllFeeds and getAllCounters --- modules/backend-rpc.php | 15 +-------------- tt-rss.js | 6 +++--- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index f28e72475..e6e263cd1 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -164,19 +164,6 @@ return; } - if ($subop == "getAllCounters") { - print ""; - print ""; - print_runtime_info($link); - print ""; - - return; - } - if ($subop == "mark") { $mark = $_REQUEST["mark"]; $id = db_escape_string($_REQUEST["id"]); @@ -296,7 +283,7 @@ return; } - if ($subop == "updateAllFeeds") { + if ($subop == "updateAllFeeds" || $subop == "getAllCounters") { $global_unread_caller = sprintf("%d", $_REQUEST["uctr"]); $global_unread = getGlobalUnread($link); diff --git a/tt-rss.js b/tt-rss.js index 130beeed0..a3b184496 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -94,9 +94,9 @@ function dlg_frefresh_callback(transport, deleted_feed) { function scheduleFeedUpdate() { - console.log("in scheduleFeedUpdate"); + window.clearTimeout(counter_timeout_id); - var query_str = "backend.php?op=rpc&subop=updateAllFeeds"; + var query_str = "backend.php?op=rpc&subop=getAllCounters"; var omode; @@ -114,7 +114,7 @@ function scheduleFeedUpdate() { query_str = query_str + "&omode=" + omode; query_str = query_str + "&uctr=" + global_unread; - console.log("REFETCH query: " + query_str); + console.log("[scheduleFeedUpdate] " + query_str); new Ajax.Request("backend.php", { parameters: query_str,