]> git.wh0rd.org Git - tt-rss.git/commitdiff
schema: ttrss_feeds, new field - include_in_digest
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 22 Aug 2006 07:29:18 +0000 (08:29 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 22 Aug 2006 07:29:18 +0000 (08:29 +0100)
backend.php
functions.php
schema/ttrss_schema_mysql.sql
schema/ttrss_schema_pgsql.sql
schema/upgrade-1.2.2-1.2.3-mysql.sql
schema/upgrade-1.2.2-1.2.3-pgsql.sql

index 10f4b438c4588684f6290413b2bb7487c66acf79..80e81e63745faad4549a345f13be70d582ff0525 100644 (file)
                        print "<br><input type=\"checkbox\" id=\"hidden\" name=\"hidden\"
                                $checked><label for=\"hidden\">Hide from my feed list</label>";
 
+                       $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest"));
+
+                       if ($include_in_digest) {
+                               $checked = "checked";
+                       } else {
+                               $checked = "";
+                       }
+
+                       print "<br><input type=\"checkbox\" id=\"include_in_digest\" 
+                               name=\"include_in_digest\"
+                               $checked><label for=\"include_in_digest\">Include in e-mail digest</label>";
+
                        print "</td></tr>";
 
                        print "</table>";
                        $private = checkbox_to_sql_bool(db_escape_string($_POST["private"]));
                        $rtl_content = checkbox_to_sql_bool(db_escape_string($_POST["rtl_content"]));
                        $hidden = checkbox_to_sql_bool(db_escape_string($_POST["hidden"]));
+                       $include_in_digest = checkbox_to_sql_bool(
+                               db_escape_string($_POST["include_in_digest"]));
 
                        if (get_pref($link, 'ENABLE_FEED_CATS')) {                      
                                if ($cat_id && $cat_id != 0) {
                                auth_pass = '$auth_pass',
                                private = $private,
                                rtl_content = $rtl_content,
-                               hidden = $hidden
+                               hidden = $hidden,
+                               include_in_digest = $include_in_digest
                                WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
                }
 
index 2dbe127b6d89d91e478ee3c4116b315fdd0ce783..89ed698fb66eb12c797c568ba0288faf3270b3bf 100644 (file)
                                ttrss_user_entries,ttrss_entries,ttrss_feeds 
                        WHERE 
                                ref_id = ttrss_entries.id AND feed_id = ttrss_feeds.id 
-                               AND hidden = false
+                               AND include_in_digest = true
                                AND $interval_query
                                AND ttrss_user_entries.owner_uid = $user_id
                                AND unread = true ORDER BY ttrss_feeds.title, date_entered DESC
index 9cd1dfba12f0f6f39aefbcc4763d11818b59cce3..961abe81158aa5bc919e960270a22d27ebb3ae50 100644 (file)
@@ -65,6 +65,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
        private bool not null default false,
        rtl_content bool not null default false,
        hidden bool not null default false,
+       include_in_digest boolean not null default true,
        index(owner_uid),
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
        index(cat_id),
index 61bb13f4835fc254150d5d591a884dba95b1a948..b08644581723b11c04c56284269a6e823c8c27db 100644 (file)
@@ -60,6 +60,7 @@ create table ttrss_feeds (id serial not null primary key,
        private boolean not null default false,
        auth_pass varchar(250) not null default '',
        hidden boolean not null default false,
+       include_in_digest boolean not null default true,
        rtl_content boolean not null default false);    
 
 create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
index 114fa0832076f9dea143dd8bbd4077327d37b0e3..5839e8faafa6a93262ff747a8ef2ce94b0997151 100644 (file)
@@ -1,5 +1,10 @@
 insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_ENABLE', 1, 'false', 'Enable e-mail digest',1,
 'This option enables sending daily digest of new (and unread) headlines on your configured e-mail address');
 
+alter table ttrss_feeds add column include_in_digest bool;
+update ttrss_feeds set include_in_digest = true;
+alter table ttrss_feeds change include_in_digest include_in_digest bool not null;
+alter table ttrss_feeds alter column include_in_digest set default true;
+
 update ttrss_version set schema_version = 10;
 
index 114fa0832076f9dea143dd8bbd4077327d37b0e3..9f292ec3d3a05bbd9ed5b3b47ff8afc98c35a1ed 100644 (file)
@@ -1,5 +1,10 @@
 insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DIGEST_ENABLE', 1, 'false', 'Enable e-mail digest',1,
 'This option enables sending daily digest of new (and unread) headlines on your configured e-mail address');
 
+alter table ttrss_feeds add column include_in_digest boolean;
+update ttrss_feeds set include_in_digest = true;
+alter table ttrss_feeds alter column include_in_digest set not null;
+alter table ttrss_feeds alter column include_in_digest set default true;
+
 update ttrss_version set schema_version = 10;