return; break; case "catsort": $corder = db_escape_string($_REQUEST["corder"]); $cats = split(",", $corder); for ($i = 0; $i < count($cats); $i++) { $cat_id = $cats[$i]; if ($cat_id > 0) { db_query($link, "UPDATE ttrss_feed_categories \n\t\t\t\t\t\t\t\tSET order_id = '{$i}' WHERE id = '{$cat_id}' AND\n\t\t\t\t\t\t\t\towner_uid = " . $_SESSION["uid"]); } } return; break; } $_SESSION["viewfeed:counters_stamp"] = time(); outputFeedList($link, $tags); break; // feeds // feeds case "view": $id = db_escape_string($_REQUEST["id"]); $cids = split(",", db_escape_string($_REQUEST["cids"])); $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 // just gets marked as read (it already exists in client cache) if ($mode == "") { outputArticleXML($link, $id, false); } else {
switch ($subop) { case "catchupAll": db_query($link, "UPDATE ttrss_user_entries SET\n\t\t\t\t\t\tlast_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]); ccache_zero_all($link, $_SESSION["uid"]); break; case "collapse": $cat_id = db_escape_string($_REQUEST["cid"]); $mode = (int) db_escape_string($_REQUEST['mode']); toggle_collapse_cat($link, $cat_id, $mode); return; break; } if (!$root) { print json_encode(outputFeedList($link)); } else { $feeds = outputFeedList($link, false); $root = array(); $root['id'] = 'root'; $root['name'] = __('Feeds'); $root['items'] = $feeds['items']; $fl = array(); $fl['identifier'] = 'id'; $fl['label'] = 'name'; $fl['items'] = array($root); print json_encode($fl); } break; // feeds // feeds case "la": $id = db_escape_string($_REQUEST['id']);