]> git.wh0rd.org - tt-rss.git/blobdiff - backend.php
dijit.tree feedlist improvements
[tt-rss.git] / backend.php
index 68187428b1b15f284a9485a40611928e70077271..c69a8ff576b4d0c9951f9f2cbde1fb20411dc2a4 100644 (file)
@@ -50,7 +50,8 @@
 
        if ((!$op || $op == "rpc" || $op == "rss" || 
                        ($op == "view" && $mode != "zoom") || 
-                       $op == "digestSend" || $op == "viewfeed" || $op == "publish" ||
+                       $op == "digestSend" || $op == "dlg" || 
+                       $op == "viewfeed" || $op == "publish" ||
                        $op == "globalUpdateFeeds") && !$_REQUEST["noxml"]) {
                                header("Content-Type: application/xml; charset=utf-8");
 
                break; // rpc
 
                case "feeds":
-                       if (ENABLE_GZIP_OUTPUT) {
-                               ob_start("ob_gzhandler");
-                       }
-
+                       $print_exec_time = true;
                        $tags = $_REQUEST["tags"];
 
                        $subop = $_REQUEST["subop"];
 
                                case "collapse":
                                        $cat_id = db_escape_string($_REQUEST["cid"]);
-                                       toggle_collapse_cat($link, $cat_id);
+                                       $mode = (int) db_escape_string($_REQUEST['mode']);
+                                       toggle_collapse_cat($link, $cat_id, $mode);
                                        return;
                                break;
 
 
                        }
 
-                       outputFeedList($link, $tags);
+                       print json_encode(outputFeedList($link, $tags));
+
                break; // feeds
 
                case "view":
                        $mode = db_escape_string($_REQUEST["mode"]);
                        $omode = db_escape_string($_REQUEST["omode"]);
 
-                       print "<reply>";
+                       if ($mode != "zoom") print "<reply>";
 
                        // in prefetch mode we only output requested cids, main article 
                        // just gets marked as read (it already exists in client cache)
                                print "]]></counters>";
                        } */
 
-                       print "</reply>";
+                       if ($mode != "zoom") print "</reply>";
                break; // view
 
                case "viewfeed":
                        }
 
                        if (!$next_unread_feed) {
-                               print "<headlines id=\"$feed\" is_cat=\"$cat_view\"><![CDATA[";
+                               print "<headlines id=\"$feed\" is_cat=\"$cat_view\">";
                        } else {
-                               print "<headlines id=\"$next_unread_feed\" is_cat=\"$cat_view\"><![CDATA[";
+                               print "<headlines id=\"$next_unread_feed\" is_cat=\"$cat_view\">";
                        }
                
                        $override_order = false;
                        $disable_cache = $ret[3];
                        $vgroup_last_feed = $ret[4];
 
-                       print "]]></headlines>";
+                       print "</headlines>";
 
                        if ($_REQUEST["debug"]) $timing_info = print_checkpoint("05", $timing_info);
 
 
                        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) {
+                       if ($subop) {
                                print "<counters><![CDATA[";
                                print json_encode(getAllCounters($link, $omode, $feed));
                                print "]]></counters>";
-                       } */
+                       } 
 
                        if ($_REQUEST["debug"]) $timing_info = print_checkpoint("30", $timing_info);