0; } function render_flat_feed_list($link, $offset) { $owner_uid = $_SESSION["uid"]; $limit = 30; if (!$offset) $offset = 0; if (mobile_get_pref($link, "SORT_FEEDS_UNREAD")) { $order_by = "unread DESC, title"; } else { $order_by = "title"; } $result = db_query($link, "SELECT id, title, (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries WHERE feed_id = ttrss_feeds.id AND unread = true AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') as unread FROM ttrss_feeds WHERE ttrss_feeds.hidden = false AND ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL ORDER BY $order_by LIMIT $limit OFFSET $offset"); if (!$offset) print '
$content
"; print ""; print "