summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-10 14:48:35 +0300
committerAndrew Dolgov <[email protected]>2010-11-10 14:48:35 +0300
commit5225d4209e52790af6bad454d7b6da6953551ace (patch)
treee2fb2529c04a189ce533ce3a122a9ae047627d56 /backend.php
parentc4f7ba80184042e593fdf064ff671f7c563f21e9 (diff)
js: code cleanup; move to async counter sending mode
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php35
1 files changed, 10 insertions, 25 deletions
diff --git a/backend.php b/backend.php
index 5cef094d6..c19c3b9e3 100644
--- a/backend.php
+++ b/backend.php
@@ -208,8 +208,6 @@
}
- $_SESSION["viewfeed:counters_stamp"] = time();
-
outputFeedList($link, $tags);
break; // feeds
@@ -220,8 +218,6 @@
$mode = db_escape_string($_REQUEST["mode"]);
$omode = db_escape_string($_REQUEST["omode"]);
- $csync = $_REQUEST["csync"];
-
print "<reply>";
// in prefetch mode we only output requested cids, main article
@@ -243,14 +239,11 @@
}
}
-// if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) {
-
- if (time() - $_SESSION["view:counters_stamp"] > 5 && $mode == "prefetch") {
+ /* if ($mode == "prefetch") {
print "<counters><![CDATA[";
print json_encode(getAllCounters($link, $omode));
print "]]></counters>";
- $_SESSION["view:counters_stamp"] = time();
- }
+ } */
print "</reply>";
break; // view
@@ -274,7 +267,6 @@
@$next_unread_feed = db_escape_string($_REQUEST["nuf"]);
@$offset = db_escape_string($_REQUEST["skip"]);
@$vgroup_last_feed = db_escape_string($_REQUEST["vgrlf"]);
- $csync = $_REQUEST["csync"];
$order_by = db_escape_string($_REQUEST["order_by"]);
/* Feed -5 is a special case: it is used to display auxiliary information
@@ -289,12 +281,9 @@
/* Updating a label ccache means recalculating all of the caches
* so for performance reasons we don't do that here */
-// if (time() - $_SESSION["viewfeed:ccache_update_stamp"] > 120) {
- if ($feed >= 0) {
- ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
- }
- $_SESSION["viewfeed:ccache_update_stamp"] = time();
-// }
+ if ($feed >= 0) {
+ ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
+ }
set_pref($link, "_DEFAULT_VIEW_MODE", $view_mode);
set_pref($link, "_DEFAULT_VIEW_LIMIT", $limit);
@@ -394,15 +383,11 @@
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("20", $timing_info);
- if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop ||
- time() - $_SESSION["viewfeed:counters_stamp"] > 5) {
- if (!$offset) {
- print "<counters><![CDATA[";
- print json_encode(getAllCounters($link, $omode, $feed));
- print "]]></counters>";
- $_SESSION["viewfeed:counters_stamp"] = time();
- }
- }
+ /* if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop || !$offset) {
+ print "<counters><![CDATA[";
+ print json_encode(getAllCounters($link, $omode, $feed));
+ print "]]></counters>";
+ } */
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("30", $timing_info);