From 2e2d0802f1ae4bd8cc82ddc53383b3927d4a1064 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Jun 2011 12:39:37 +0400 Subject: [PATCH] mobile: rename HIDE_READ option, show read articles when it is disabled (refs #348) --- mobile/functions.php | 9 +++++++-- mobile/prefs.php | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mobile/functions.php b/mobile/functions.php index 542420af..d99a4754 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -323,7 +323,11 @@ $feed_id = $feed_id; $limit = 15; $filter = ''; - $view_mode = 'adaptive'; + + if (!mobile_get_pref($link, "HIDE_READ")) + $view_mode = "all_articles"; + else + $view_mode = 'adaptive'; if ($search) { $search_mode = 'this_feed'; @@ -334,7 +338,8 @@ } $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, - $view_mode, $is_cat, $search, $search_mode, $match_on, false, $offset); + $view_mode, $is_cat, $search, $search_mode, $match_on, + "unread DESC, updated, score", $offset); $result = $qfh_ret[0]; $feed_title = $qfh_ret[1]; diff --git a/mobile/prefs.php b/mobile/prefs.php index e3ccd7db..a5a9403e 100644 --- a/mobile/prefs.php +++ b/mobile/prefs.php @@ -7,11 +7,11 @@ require_once "../config.php"; require_once "functions.php"; - require_once "../functions.php"; + require_once "../functions.php"; require_once "../sessions.php"; - require_once "../version.php"; + require_once "../version.php"; require_once "../db-prefs.php"; $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); @@ -43,7 +43,7 @@
- +
">
-- 2.39.5