summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/functions.php2
-rw-r--r--mobile/mobile-functions.php2
-rw-r--r--mobile/prefs.php5
-rw-r--r--schema/ttrss_schema_mysql.sql4
-rw-r--r--schema/ttrss_schema_pgsql.sql4
-rw-r--r--schema/versions/mysql/102.sql7
-rw-r--r--schema/versions/pgsql/102.sql7
7 files changed, 27 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index f0bd31831..d3dbfb073 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 26);
- define('SCHEMA_VERSION', 101);
+ define('SCHEMA_VERSION', 102);
$fetch_last_error = false;
$pluginhost = false;
diff --git a/mobile/mobile-functions.php b/mobile/mobile-functions.php
index ffd7ba80d..65bba55df 100644
--- a/mobile/mobile-functions.php
+++ b/mobile/mobile-functions.php
@@ -349,7 +349,7 @@
$qfh_ret = queryFeedHeadlines($link, $feed_id, $limit,
$view_mode, $is_cat, $search, $search_mode, $match_on,
- "score DESC, date_entered DESC", $offset);
+ "score DESC, date_entered ".(mobile_get_pref($link, 'REVERSE_HEADLINES') ? 'ASC' : 'DESC'), $offset);
$result = $qfh_ret[0];
$feed_title = $qfh_ret[1];
diff --git a/mobile/prefs.php b/mobile/prefs.php
index 59c2d04ae..6b053dc3b 100644
--- a/mobile/prefs.php
+++ b/mobile/prefs.php
@@ -46,4 +46,9 @@
<div class="toggle" id="SORT_FEEDS_UNREAD" onclick="setPref(this)" toggled="<?php echo mobile_pref_toggled($link, "SORT_FEEDS_UNREAD") ?>"><span class="thumb"></span><span class="toggleOn"><?php echo __('ON') ?></span><span class="toggleOff"><?php echo __('OFF') ?></span></div>
</div>
+<div class="row">
+ <label><?php echo __('Reverse headline order (oldest first)') ?></label>
+ <div class="toggle" id="REVERSE_HEADLINES" onclick="setPref(this)" toggled="<?php echo mobile_pref_toggled($link, "REVERSE_HEADLINES") ?>"><span class="thumb"></span><span class="toggleOn"><?php echo __('ON') ?></span><span class="toggleOff"><?php echo __('OFF') ?></span></div>
+</div>
+
</fieldset>
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index d4531308f..10320b5b7 100644
--- a/schema/ttrss_schema_mysql.sql
+++ b/schema/ttrss_schema_mysql.sql
@@ -309,7 +309,7 @@ create table ttrss_tags (id integer primary key auto_increment,
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (101);
+insert into ttrss_version values (102);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
@@ -455,6 +455,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_ENABLED_PLUGINS', 2, '', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+
update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
'SORT_HEADLINES_BY_FEED_DATE',
'VFEED_GROUP_BY_FEED',
diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index f52d4191d..33c32d181 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -257,7 +257,7 @@ create index ttrss_tags_post_int_id_idx on ttrss_tags(post_int_id);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (101);
+insert into ttrss_version values (102);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@@ -395,6 +395,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_ENABLED_PLUGINS', 2, '', '', 1);
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+
update ttrss_prefs set access_level = 1 where pref_name in ('ON_CATCHUP_SHOW_NEXT_FEED',
'SORT_HEADLINES_BY_FEED_DATE',
'VFEED_GROUP_BY_FEED',
diff --git a/schema/versions/mysql/102.sql b/schema/versions/mysql/102.sql
new file mode 100644
index 000000000..ccf5ef3b3
--- /dev/null
+++ b/schema/versions/mysql/102.sql
@@ -0,0 +1,7 @@
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+
+update ttrss_version set schema_version = 102;
+
+commit;
diff --git a/schema/versions/pgsql/102.sql b/schema/versions/pgsql/102.sql
new file mode 100644
index 000000000..ccf5ef3b3
--- /dev/null
+++ b/schema/versions/pgsql/102.sql
@@ -0,0 +1,7 @@
+begin;
+
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_MOBILE_REVERSE_HEADLINES', 1, 'false', '', 1);
+
+update ttrss_version set schema_version = 102;
+
+commit;