]> git.wh0rd.org Git - tt-rss.git/commitdiff
properly persist include_children
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 Aug 2012 05:11:43 +0000 (09:11 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 15 Aug 2012 05:11:43 +0000 (09:11 +0400)
classes/feeds.php
include/functions.php
schema/ttrss_schema_mysql.sql
schema/ttrss_schema_pgsql.sql
schema/versions/mysql/94.sql [new file with mode: 0644]
schema/versions/pgsql/94.sql [new file with mode: 0644]

index be7886472a5a9d163cccb3af432f7ba78048afa8..a3062565a5e227beff4ff94068fe25d9a125869e 100644 (file)
@@ -805,8 +805,7 @@ class Feeds extends Protected_Handler {
                set_pref($this->link, "_DEFAULT_VIEW_MODE", $view_mode);\r
                set_pref($this->link, "_DEFAULT_VIEW_LIMIT", $limit);\r
                set_pref($this->link, "_DEFAULT_VIEW_ORDER_BY", $order_by);\r
-\r
-               $_SESSION["_DEFAULT_INCLUDE_CHILDREN"] = $include_children;\r
+               set_pref($this->link, "_DEFAULT_INCLUDE_CHILDREN", $include_children);\r
 \r
                if (!$cat_view && preg_match("/^[0-9][0-9]*$/", $feed)) {\r
                        db_query($this->link, "UPDATE ttrss_feeds SET last_viewed = NOW()\r
index ac9c5372ce6e567c55d1bd11b9d2c5906b6066b2..91f3b900eaa68db7c10cb660446d96dd56dd41cb 100644 (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');
 
                $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");
index 3f63d44eee28be05d0a97eb3c2fd42d8b3621e47..4a272682236192b12fb7045bbfb36551b765e372 100644 (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),
index d5d3f88f002a923ca143efeeddaa72eb43be123d..208005cf662e7200fa43b2d42d2fc3d1200bc42b 100644 (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,
diff --git a/schema/versions/mysql/94.sql b/schema/versions/mysql/94.sql
new file mode 100644 (file)
index 0000000..0f76c4c
--- /dev/null
@@ -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;
diff --git a/schema/versions/pgsql/94.sql b/schema/versions/pgsql/94.sql
new file mode 100644 (file)
index 0000000..0f76c4c
--- /dev/null
@@ -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;