]> git.wh0rd.org Git - tt-rss.git/commitdiff
mobile: rename HIDE_READ option, show read articles when it is disabled (refs #348)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 08:39:37 +0000 (12:39 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 14 Jun 2011 08:39:37 +0000 (12:39 +0400)
mobile/functions.php
mobile/prefs.php

index 542420afeb9daa66de3ee3a44c372ebeee6d56c9..d99a47546a1f68843492c41337aa07f3f7d9cfb1 100644 (file)
                $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';
                }
 
                $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];
index e3ccd7db9780a589504186ca0c3294c17f381894..a5a9403e96f4b76c5413d487e095814d6df0e8e5 100644 (file)
@@ -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 @@
 </div>
 
 <div class="row">
-       <label><?php echo __('Hide read feeds') ?></label>
+       <label><?php echo __('Hide read articles and feeds') ?></label>
        <div class="toggle" id="HIDE_READ" onclick="setPref(this)" toggled="<?php echo mobile_pref_toggled($link, "HIDE_READ") ?>"><span class="thumb"></span><span class="toggleOn"><?php echo __('ON') ?></span><span class="toggleOff"><?php echo __('OFF') ?></span></div>
 </div>