summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-17 16:01:09 +0100
committerAndrew Dolgov <[email protected]>2009-01-17 16:01:09 +0100
commita06d0e5a8b92a2015a05b376eb6b8f4a9878c4e0 (patch)
tree2ca75170477ed9a7c0b1a3397d9756d726e4d7a7
parent00fceabf61a67abdd4a119f562f013f8ed6b022b (diff)
rpc tweaks; viewfeed counters attachment changed
-rw-r--r--backend.php9
-rw-r--r--feedlist.js3
-rw-r--r--modules/backend-rpc.php28
3 files changed, 19 insertions, 21 deletions
diff --git a/backend.php b/backend.php
index d26461b4f..67f254a19 100644
--- a/backend.php
+++ b/backend.php
@@ -337,11 +337,6 @@
if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
- $viewfeed_ctr_interval = 300;
-
- if ($csync || $_SESSION["bw_limit"]) {
- $viewfeed_ctr_interval = 60;
- }
// if (get_pref($link, "SYNC_COUNTERS") ||
// time() - $_SESSION["get_all_counters_stamp"] > $viewfeed_ctr_interval) {
@@ -350,11 +345,13 @@
// print "</counters>";
// }
- if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop) {
+ if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop ||
+ time() - $_SESSION["viewfeed:counters_stamp"] > 30) {
if (!$offset) {
print "<counters>";
getAllCounters($link, $omode, $feed);
print "</counters>";
+ $_SESSION["viewfeed:counters_stamp"] = time();
}
}
diff --git a/feedlist.js b/feedlist.js
index 06fea27c7..68c93e4c5 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -394,7 +394,8 @@ function feedlist_init() {
document.onmousemove = mouse_move_handler;
document.onmousedown = mouse_down_handler;
document.onmouseup = mouse_up_handler;
- setTimeout("timeout()", 0);
+
+ setTimeout("timeout()", 1);
if (typeof correctPNG != 'undefined') {
correctPNG();
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 41e8ebd18..4d65ee23e 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -142,26 +142,26 @@
print "<counters>";
- $omode = $_GET["omode"];
+ if ($global_unread_caller != $global_unread) {
+
+ $omode = $_GET["omode"];
- if (!$omode) $omode = "tflc";
+ if (!$omode) $omode = "tflc";
- if (strchr($omode, "l")) getLabelCounters($link);
+ if (strchr($omode, "l")) getLabelCounters($link);
- if (strchr($omode, "c")) {
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
- getCategoryCounters($link);
- }
- }
-
- if ($global_unread_caller != $global_unread) {
+ if (strchr($omode, "c")) {
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
+ }
+ }
if (strchr($omode, "f")) getFeedCounters($link);
- if (strchr($omode, "t")) getTagCounters($link);
- }
-
- getGlobalCounters($link, $global_unread);
+ if (strchr($omode, "t")) getTagCounters($link);
+ getGlobalCounters($link, $global_unread);
+ }
+
print "</counters>";
print_runtime_info($link);