From: Andrew Dolgov Date: Fri, 18 Mar 2011 15:08:07 +0000 (+0300) Subject: mobile: fix uncategorized category not respecting the browse cat setting X-Git-Tag: 1.5.2~9 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4308d33ff48a5fc775bb6a308c921dd336a71673;p=tt-rss.git mobile: fix uncategorized category not respecting the browse cat setting --- diff --git a/mobile/functions.php b/mobile/functions.php index 68530cf8..3d3cdc66 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -4,7 +4,7 @@ /* TODO replace with interface to db-prefs */ function mobile_pref_toggled($link, $id) { - if (get_pref($link, "_MOBILE_$id")) + if (get_pref($link, "_MOBILE_$id")) return "true"; else return ""; @@ -51,10 +51,10 @@ AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') AS unread FROM ttrss_feeds - WHERE + WHERE ttrss_feeds.owner_uid = '$owner_uid' - ORDER BY $order_by $limit_qpart"); - + ORDER BY $order_by $limit_qpart"); + if (!$offset) print '"; @@ -102,7 +102,7 @@ function render_category($link, $cat_id, $offset) { $owner_uid = $_SESSION["uid"]; - + if ($cat_id >= 0) { if ($cat_id != 0) { @@ -124,31 +124,31 @@ AND ttrss_user_entries.ref_id = ttrss_entries.id AND owner_uid = '$owner_uid') as unread FROM ttrss_feeds - WHERE - ttrss_feeds.owner_uid = '$owner_uid' AND + WHERE + ttrss_feeds.owner_uid = '$owner_uid' AND $cat_query - ORDER BY $order_by"); - + ORDER BY $order_by"); + $title = getCategoryTitle($link, $cat_id); - + print ""; } else if ($cat_id == -1) { @@ -232,13 +232,13 @@ print '"; } - function render_headlines_list($link, $feed_id, $cat_id, $offset, $search, + function render_headlines_list($link, $feed_id, $cat_id, $offset, $search, $is_cat = false) { $feed_id = $feed_id; @@ -329,7 +333,7 @@ $match_on = ''; } - $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, + $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, $view_mode, $is_cat, $search, $search_mode, $match_on, false, $offset); $result = $qfh_ret[0]; @@ -337,7 +341,7 @@ if (!$offset) { - print "
@@ -351,7 +355,7 @@ -
"; + "; if ($cat_id) { $cat_title = getCategoryTitle($link, $cat_id); @@ -412,7 +416,7 @@ $articles_url = "feed.php?id=$feed_id&cat=$cat_id&skip=$next_offset". "&search=$search"; - print "
  • Get more articles...
  • "; } @@ -427,7 +431,7 @@ ".SUBSTRING_FOR_DATE."(updated,1,16) as updated, author FROM ttrss_entries,ttrss_user_entries - WHERE id = '$id' AND ref_id = id AND owner_uid = " . + WHERE id = '$id' AND ref_id = id AND owner_uid = " . $_SESSION["uid"] ; $result = db_query($link, $query); @@ -436,8 +440,8 @@ $line = db_fetch_assoc($result); - $tmp_result = db_query($link, "UPDATE ttrss_user_entries - SET unread = false,last_read = NOW() + $tmp_result = db_query($link, "UPDATE ttrss_user_entries + SET unread = false,last_read = NOW() WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); @@ -445,29 +449,29 @@ $title = $line["title"]; $article_link = $line["link"]; - + $feed_title = getFeedTitle($link, $feed_id, false); - - print "
    "; - + print "

    $title

    "; - + print "
    "; - + /* print "
    "; print ""; print "
    "; */ - + $is_starred = (sql_bool_to_bool($line["marked"])) ? "true" : "false"; $is_published = (sql_bool_to_bool($line["published"])) ? "true" : "false"; - + print "
    "; print ""; print ""; print "
    "; - + print "
    "; $content = sanitize_rss($link, $line["content"]); @@ -491,7 +495,7 @@
    ONOFF
    "; - + print "
    ONOFF