From: Andrew Dolgov Date: Tue, 22 Aug 2006 07:29:18 +0000 (+0100) Subject: schema: ttrss_feeds, new field - include_in_digest X-Git-Tag: 1.2.3~35 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3dd9183cd603df99ae8d2bf5cb536b24bc030e20;p=tt-rss.git schema: ttrss_feeds, new field - include_in_digest --- diff --git a/backend.php b/backend.php index 10f4b438..80e81e63 100644 --- a/backend.php +++ b/backend.php @@ -1358,6 +1358,18 @@ print "
"; + $include_in_digest = sql_bool_to_bool(db_fetch_result($result, 0, "include_in_digest")); + + if ($include_in_digest) { + $checked = "checked"; + } else { + $checked = ""; + } + + print "
"; + print ""; print ""; @@ -1389,6 +1401,8 @@ $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) { @@ -1416,7 +1430,8 @@ 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"]); } diff --git a/functions.php b/functions.php index 2dbe127b..89ed698f 100644 --- a/functions.php +++ b/functions.php @@ -2438,7 +2438,7 @@ 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 diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 9cd1dfba..961abe81 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -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), diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 61bb13f4..b0864458 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -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); diff --git a/schema/upgrade-1.2.2-1.2.3-mysql.sql b/schema/upgrade-1.2.2-1.2.3-mysql.sql index 114fa083..5839e8fa 100644 --- a/schema/upgrade-1.2.2-1.2.3-mysql.sql +++ b/schema/upgrade-1.2.2-1.2.3-mysql.sql @@ -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; diff --git a/schema/upgrade-1.2.2-1.2.3-pgsql.sql b/schema/upgrade-1.2.2-1.2.3-pgsql.sql index 114fa083..9f292ec3 100644 --- a/schema/upgrade-1.2.2-1.2.3-pgsql.sql +++ b/schema/upgrade-1.2.2-1.2.3-pgsql.sql @@ -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;