properly persist include_children

This commit is contained in:
Andrew Dolgov 2012-08-15 09:11:43 +04:00
parent fbf85cf646
commit e07f89815b
6 changed files with 23 additions and 6 deletions

View File

@ -805,8 +805,7 @@ class Feeds extends Protected_Handler {
set_pref($this->link, "_DEFAULT_VIEW_MODE", $view_mode);
set_pref($this->link, "_DEFAULT_VIEW_LIMIT", $limit);
set_pref($this->link, "_DEFAULT_VIEW_ORDER_BY", $order_by);
$_SESSION["_DEFAULT_INCLUDE_CHILDREN"] = $include_children;
set_pref($this->link, "_DEFAULT_INCLUDE_CHILDREN", $include_children);
if (!$cat_view && preg_match("/^[0-9][0-9]*$/", $feed)) {
db_query($this->link, "UPDATE ttrss_feeds SET last_viewed = NOW()

View File

@ -1,6 +1,6 @@
<?php
define('EXPECTED_CONFIG_VERSION', 25);
define('SCHEMA_VERSION', 93);
define('SCHEMA_VERSION', 94);
mb_internal_encoding("UTF-8");
date_default_timezone_set('UTC');
@ -2152,7 +2152,7 @@
$params["icons_url"] = ICONS_URL;
$params["cookie_lifetime"] = SESSION_COOKIE_LIFETIME;
$params["default_include_children"] = $_SESSION["_DEFAULT_INCLUDE_CHILDREN"];
$params["default_include_children"] = get_pref($link, "_DEFAULT_INCLUDE_CHILDREN");
$params["default_view_mode"] = get_pref($link, "_DEFAULT_VIEW_MODE");
$params["default_view_limit"] = (int) get_pref($link, "_DEFAULT_VIEW_LIMIT");
$params["default_view_order_by"] = get_pref($link, "_DEFAULT_VIEW_ORDER_BY");

View File

@ -270,7 +270,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 (93);
insert into ttrss_version values (94);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
@ -408,6 +408,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('_PREFS_SHOW_EMPTY_CATS', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 1);
create table ttrss_user_prefs (
owner_uid integer not null,
pref_name varchar(250),

View File

@ -232,7 +232,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 (93);
insert into ttrss_version values (94);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
@ -363,6 +363,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('_PREFS_SHOW_EMPTY_CATS', 1, 'false', '', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 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

@ -0,0 +1,7 @@
begin;
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 1);
update ttrss_version set schema_version = 94;
commit;

View File

@ -0,0 +1,7 @@
begin;
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_DEFAULT_INCLUDE_CHILDREN', 1, 'false', '', 1);
update ttrss_version set schema_version = 94;
commit;