From 237ec2ad9c0ac3e0fa1515699ebaa1df41405378 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 17 Jul 2007 04:29:53 +0100 Subject: [PATCH] disable headlines pagination (add hidden pref _PREFS_ENABLE_PAGINATION) --- functions.php | 11 ++++++++--- sanity_check.php | 2 +- schema/ttrss_schema_mysql.sql | 4 +++- schema/ttrss_schema_pgsql.sql | 4 +++- schema/versions/mysql/18.sql | 3 +++ schema/versions/pgsql/18.sql | 3 +++ 6 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 schema/versions/mysql/18.sql create mode 100644 schema/versions/pgsql/18.sql diff --git a/functions.php b/functions.php index 9f7f39d24..4257184c1 100644 --- a/functions.php +++ b/functions.php @@ -3043,10 +3043,13 @@
  • ".__('Mark as read')."
  • -
  •  
  • "; + "; - if ($limit != 0 && !$search) { + $enable_pagination = get_pref($link, "_PREFS_ENABLE_PAGINATION"); + + if ($limit != 0 && !$search && $enable_pagination) { print " +
  •  
  • ".__('Next page')."
  • @@ -3054,7 +3057,9 @@ } if ($search && $feed_id >= 0 && get_pref($link, 'ENABLE_LABELS') && GLOBAL_ENABLE_LABELS) { - print "
  • + print " +
  •  
  • +
  • ".__('Convert to label').""; diff --git a/sanity_check.php b/sanity_check.php index adb7ab878..81d969364 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,7 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 7); - define('SCHEMA_VERSION', 17); + define('SCHEMA_VERSION', 18); if (!file_exists("config.php")) { print __("Fatal Error: You forgot to copy diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 355dab790..86261d6f4 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -189,7 +189,7 @@ create table ttrss_tags (id integer primary key auto_increment, create table ttrss_version (schema_version int not null) TYPE=InnoDB; -insert into ttrss_version values (17); +insert into ttrss_version values (18); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null) TYPE=InnoDB; @@ -284,6 +284,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_SEARCH_TOOLBAR', 1, 'false', 'Enable search toolbar',2); +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ENABLE_PAGINATION', 2, '', '', 1); + create table ttrss_user_prefs ( owner_uid integer not null, pref_name varchar(250), diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index b18212725..65a528c3a 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -173,7 +173,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (17); +insert into ttrss_version values (18); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null); @@ -264,6 +264,8 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('ENABLE_SEARCH_TOOLBAR', 1, 'false', 'Enable search toolbar',2); +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ENABLE_PAGINATION', 2, '', '', 1); + create table ttrss_user_prefs ( owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE, diff --git a/schema/versions/mysql/18.sql b/schema/versions/mysql/18.sql new file mode 100644 index 000000000..e03c96fd0 --- /dev/null +++ b/schema/versions/mysql/18.sql @@ -0,0 +1,3 @@ +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ENABLE_PAGINATION', 2, '', '', 1); + +update ttrss_version set schema_version = 18; diff --git a/schema/versions/pgsql/18.sql b/schema/versions/pgsql/18.sql new file mode 100644 index 000000000..e03c96fd0 --- /dev/null +++ b/schema/versions/pgsql/18.sql @@ -0,0 +1,3 @@ +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ENABLE_PAGINATION', 2, '', '', 1); + +update ttrss_version set schema_version = 18;