diff --git a/backend.php b/backend.php index 1b318906..a71b649e 100644 --- a/backend.php +++ b/backend.php @@ -12,8 +12,6 @@ error_reporting(DEFAULT_ERROR_LEVEL); */ - define('SCHEMA_VERSION', 16); - require_once "sanity_check.php"; require_once "config.php"; diff --git a/sanity_check.php b/sanity_check.php index 721c7140..adb7ab87 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,6 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 7); + define('SCHEMA_VERSION', 17); 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 92ab1030..c7e5677c 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 (16); +insert into ttrss_version values (17); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null) TYPE=InnoDB; @@ -272,6 +272,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('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1); +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 3, '', '', 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 6e89455a..35dc31e4 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 (16); +insert into ttrss_version values (17); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null); @@ -252,6 +252,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('_DEFAULT_VIEW_LIMIT', 3, '30', '', 1); +insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_ACTIVE_TAB', 3, '', '', 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/update.php b/update.php index 665ec949..e3a25f47 100644 --- a/update.php +++ b/update.php @@ -24,8 +24,7 @@ render_login_form($link); exit; } - - define('SCHEMA_VERSION', 16); + ?> @@ -94,7 +93,7 @@ function confirmOP() { } if (!$op) { - print "
".__("Warning: Please backup your database before proceeding.")."
"; + print_warning("Please backup your database before proceeding."); print "" . T_sprintf("Your Tiny Tiny RSS database needs update to the latest version (%d to %d).", $version, $latest_version) . "
"; diff --git a/utility.css b/utility.css index 9bdb77c2..f51182a7 100644 --- a/utility.css +++ b/utility.css @@ -28,3 +28,27 @@ a:hover { color : black; } +div.notice { + background : #ffffff; + border : 1px solid #88b0f0; + width : 50%; + padding : 5px; + margin : 0px 0px 5px 0px; + font-size : 9pt; +} + +div.warning { + background : #fff7d5; + border : 1px solid #d7c47a; + font-size : 9pt; + width : 50%; + padding : 5px; + margin : 0px 0px 5px 0px; +} + + +div.warning img, div.notice img { + vertical-align : middle; + padding : 5px; +} +