add _PREFS_ACTIVE_TAB hidden option, tweak update.php, move SCHEMA_VERSION definition to sanity_check.php

This commit is contained in:
Andrew Dolgov 2007-05-04 04:15:58 +01:00
parent d3687e7a9e
commit 87b9fb6532
6 changed files with 33 additions and 7 deletions

View File

@ -12,8 +12,6 @@
error_reporting(DEFAULT_ERROR_LEVEL); */
define('SCHEMA_VERSION', 16);
require_once "sanity_check.php";
require_once "config.php";

View File

@ -2,6 +2,7 @@
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 7);
define('SCHEMA_VERSION', 17);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy

View File

@ -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),

View File

@ -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,

View File

@ -24,8 +24,7 @@
render_login_form($link);
exit;
}
define('SCHEMA_VERSION', 16);
?>
@ -94,7 +93,7 @@ function confirmOP() {
}
if (!$op) {
print "<p class='warning'>".__("<b>Warning:</b> Please backup your database before proceeding.")."</p>";
print_warning("Please backup your database before proceeding.");
print "<p>" . T_sprintf("Your Tiny Tiny RSS database needs update to the latest version (<b>%d</b> to <b>%d</b>).", $version, $latest_version) . "</p>";

View File

@ -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;
}