]> git.wh0rd.org Git - tt-rss.git/commitdiff
viewfeed: return counters when subop is present or when in CDM
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 06:56:03 +0000 (09:56 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 11 Nov 2010 06:56:07 +0000 (09:56 +0300)
backend.php
functions.php
viewfeed.js

index 5e963f1ebfcce7e6b16cacc47170f246579a7da9..d9b44aefadd6e0976410cebc4833c543438d0752 100644 (file)
 
                        if ($_REQUEST["debug"]) $timing_info = print_checkpoint("20", $timing_info);
 
-                       /* if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop || !$offset) {
+                        if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop) {
                                print "<counters><![CDATA[";
                                print json_encode(getAllCounters($link, $omode, $feed));
                                print "]]></counters>";
-                       } */
+                       } 
 
                        if ($_REQUEST["debug"]) $timing_info = print_checkpoint("30", $timing_info);
 
index d5852bde1b3bd5ae1c19f7f1250f08b1cc0be7ac..a9a7cea515787d1b41741911874624e4ed092314 100644 (file)
                }
        }
 
-       function catchup_feed($link, $feed, $cat_view, $owner_uid) {
+       function catchup_feed($link, $feed, $cat_view, $owner_uid = false) {
 
                        if (!$owner_uid) $owner_uid = $_SESSION['uid'];
 
index 92564da6c8991927b88a38447b44304a4622ff22..f46b97863dfd4fb130e1201602b631fae10875c8 100644 (file)
@@ -201,8 +201,11 @@ function headlines_callback2(transport, feed_cur_page) {
                        } else {
                                console.log("no cached articles received");
                        }
-       
-                       request_counters();
+
+                       if (counters)
+                               parse_counters(counters);
+                       else
+                               request_counters();
 
                        if (runtime_info) {
                                parse_runtime_info(runtime_info[0]);