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);