add ttrss_feeds.update_on_checksum_change
This commit is contained in:
parent
9382ca847f
commit
74b046a1c9
|
@ -517,7 +517,7 @@
|
||||||
|
|
||||||
$result = db_query($link, "SELECT id,update_interval,auth_login,
|
$result = db_query($link, "SELECT id,update_interval,auth_login,
|
||||||
feed_url,auth_pass,cache_images,update_method,last_updated,
|
feed_url,auth_pass,cache_images,update_method,last_updated,
|
||||||
mark_unread_on_update, owner_uid
|
mark_unread_on_update, owner_uid, update_on_checksum_change
|
||||||
FROM ttrss_feeds WHERE id = '$feed'");
|
FROM ttrss_feeds WHERE id = '$feed'");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -533,6 +533,7 @@
|
||||||
$last_updated = db_fetch_result($result, 0, "last_updated");
|
$last_updated = db_fetch_result($result, 0, "last_updated");
|
||||||
$owner_uid = db_fetch_result($result, 0, "owner_uid");
|
$owner_uid = db_fetch_result($result, 0, "owner_uid");
|
||||||
$mark_unread_on_update = db_fetch_result($result, 0, "mark_unread_on_update");
|
$mark_unread_on_update = db_fetch_result($result, 0, "mark_unread_on_update");
|
||||||
|
$update_on_checksum_change = db_fetch_result($result, 0, "update_on_checksum_change");
|
||||||
|
|
||||||
db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW()
|
db_query($link, "UPDATE ttrss_feeds SET last_update_started = NOW()
|
||||||
WHERE id = '$feed'");
|
WHERE id = '$feed'");
|
||||||
|
@ -1202,8 +1203,7 @@
|
||||||
|
|
||||||
$post_needs_update = false;
|
$post_needs_update = false;
|
||||||
|
|
||||||
if (get_pref($link, "UPDATE_POST_ON_CHECKSUM_CHANGE", $owner_uid, false) &&
|
if ($update_on_checksum_change && $content_hash != $orig_content_hash) {
|
||||||
($content_hash != $orig_content_hash)) {
|
|
||||||
// print "<!-- [$entry_title] $content_hash vs $orig_content_hash -->";
|
// print "<!-- [$entry_title] $content_hash vs $orig_content_hash -->";
|
||||||
$post_needs_update = true;
|
$post_needs_update = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,6 +462,18 @@
|
||||||
name=\"mark_unread_on_update\"
|
name=\"mark_unread_on_update\"
|
||||||
$checked> <label for=\"mark_unread_on_update\">".__('Mark updated articles as unread')."</label>";
|
$checked> <label for=\"mark_unread_on_update\">".__('Mark updated articles as unread')."</label>";
|
||||||
|
|
||||||
|
$update_on_checksum_change = sql_bool_to_bool(db_fetch_result($result, 0, "update_on_checksum_change"));
|
||||||
|
|
||||||
|
if ($update_on_checksum_change) {
|
||||||
|
$checked = "checked";
|
||||||
|
} else {
|
||||||
|
$checked = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<hr/><input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" id=\"update_on_checksum_change\"
|
||||||
|
name=\"update_on_checksum_change\"
|
||||||
|
$checked> <label for=\"update_on_checksum_change\">".__('Mark posts as updated on content change')."</label>";
|
||||||
|
|
||||||
# print "</div>";
|
# print "</div>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
@ -639,6 +651,11 @@
|
||||||
|
|
||||||
print " "; batch_edit_cbox("mark_unread_on_update", "mark_unread_on_update_l");
|
print " "; batch_edit_cbox("mark_unread_on_update", "mark_unread_on_update_l");
|
||||||
|
|
||||||
|
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"update_on_checksum_change\"
|
||||||
|
name=\"update_on_checksum_change\"
|
||||||
|
dojoType=\"dijit.form.CheckBox\"> <label id=\"update_on_checksum_change_l\" class='insensitive' for=\"update_on_checksum_change\">".__('Mark posts as updated on content change')."</label>";
|
||||||
|
|
||||||
|
print " "; batch_edit_cbox("update_on_checksum_change", "update_on_checksum_change_l");
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
@ -679,6 +696,9 @@
|
||||||
$mark_unread_on_update = checkbox_to_sql_bool(
|
$mark_unread_on_update = checkbox_to_sql_bool(
|
||||||
db_escape_string($_POST["mark_unread_on_update"]));
|
db_escape_string($_POST["mark_unread_on_update"]));
|
||||||
|
|
||||||
|
$update_on_checksum_change = checkbox_to_sql_bool(
|
||||||
|
db_escape_string($_POST["update_on_checksum_change"]));
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
if ($cat_id && $cat_id != 0) {
|
if ($cat_id && $cat_id != 0) {
|
||||||
$category_qpart = "cat_id = '$cat_id',";
|
$category_qpart = "cat_id = '$cat_id',";
|
||||||
|
@ -713,6 +733,7 @@
|
||||||
include_in_digest = $include_in_digest,
|
include_in_digest = $include_in_digest,
|
||||||
always_display_enclosures = $always_display_enclosures,
|
always_display_enclosures = $always_display_enclosures,
|
||||||
mark_unread_on_update = $mark_unread_on_update,
|
mark_unread_on_update = $mark_unread_on_update,
|
||||||
|
update_on_checksum_change = $update_on_checksum_change,
|
||||||
update_method = '$update_method'
|
update_method = '$update_method'
|
||||||
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
||||||
|
|
||||||
|
@ -772,6 +793,10 @@
|
||||||
$qpart = "mark_unread_on_update = '$mark_unread_on_update'";
|
$qpart = "mark_unread_on_update = '$mark_unread_on_update'";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "update_on_checksum_change":
|
||||||
|
$qpart = "update_on_checksum_change = '$update_on_checksum_change'";
|
||||||
|
break;
|
||||||
|
|
||||||
case "cache_images":
|
case "cache_images":
|
||||||
$qpart = "cache_images = '$cache_images'";
|
$qpart = "cache_images = '$cache_images'";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -123,6 +123,7 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
|
||||||
update_method integer not null default 0,
|
update_method integer not null default 0,
|
||||||
order_id integer not null default 0,
|
order_id integer not null default 0,
|
||||||
mark_unread_on_update boolean not null default false,
|
mark_unread_on_update boolean not null default false,
|
||||||
|
update_on_checksum_change boolean not null default false,
|
||||||
strip_images boolean not null default false,
|
strip_images boolean not null default false,
|
||||||
index(owner_uid),
|
index(owner_uid),
|
||||||
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
||||||
|
@ -304,7 +305,6 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
|
||||||
foreign key (section_id) references ttrss_prefs_sections(id)) TYPE=InnoDB DEFAULT CHARSET=UTF8;
|
foreign key (section_id) references ttrss_prefs_sections(id)) TYPE=InnoDB DEFAULT CHARSET=UTF8;
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('UPDATE_POST_ON_CHECKSUM_CHANGE', 1, 'true', 'Update post on checksum change',1);
|
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1);
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ create table ttrss_feeds (id serial not null primary key,
|
||||||
always_display_enclosures boolean not null default false,
|
always_display_enclosures boolean not null default false,
|
||||||
order_id integer not null default 0,
|
order_id integer not null default 0,
|
||||||
mark_unread_on_update boolean not null default false,
|
mark_unread_on_update boolean not null default false,
|
||||||
|
update_on_checksum_change boolean not null default false,
|
||||||
strip_images boolean not null default false,
|
strip_images boolean not null default false,
|
||||||
auth_pass_encrypted boolean not null default false);
|
auth_pass_encrypted boolean not null default false);
|
||||||
|
|
||||||
|
@ -267,7 +268,6 @@ create table ttrss_prefs (pref_name varchar(250) not null primary key,
|
||||||
def_value text not null);
|
def_value text not null);
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('PURGE_OLD_DAYS', 3, '60', 'Purge old posts after this number of days (0 - disables)',1);
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('UPDATE_POST_ON_CHECKSUM_CHANGE', 1, 'true', 'Update post on checksum change',1);
|
|
||||||
|
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 'Default interval between feed updates',1);
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,14 @@ update ttrss_feeds set strip_images = false;
|
||||||
alter table ttrss_feeds change strip_images strip_images boolean not null;
|
alter table ttrss_feeds change strip_images strip_images boolean not null;
|
||||||
alter table ttrss_feeds alter column strip_images set default false;
|
alter table ttrss_feeds alter column strip_images set default false;
|
||||||
|
|
||||||
DELETE FROM ttrss_user_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE');
|
alter table ttrss_feeds add column update_on_checksum_change boolean;
|
||||||
|
update ttrss_feeds set update_on_checksum_change = false;
|
||||||
|
alter table ttrss_feeds change update_on_checksum_change update_on_checksum_change boolean not null;
|
||||||
|
alter table ttrss_feeds alter column update_on_checksum_change set default false;
|
||||||
|
|
||||||
DELETE FROM ttrss_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE');
|
DELETE FROM ttrss_user_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE', 'UPDATE_POST_ON_CHECKSUM_CHANGE');
|
||||||
|
|
||||||
|
DELETE FROM ttrss_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE', 'UPDATE_POST_ON_CHECKSUM_CHANGE');
|
||||||
|
|
||||||
update ttrss_version set schema_version = 83;
|
update ttrss_version set schema_version = 83;
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,14 @@ update ttrss_feeds set strip_images = false;
|
||||||
alter table ttrss_feeds alter column strip_images set not null;
|
alter table ttrss_feeds alter column strip_images set not null;
|
||||||
alter table ttrss_feeds alter column strip_images set default false;
|
alter table ttrss_feeds alter column strip_images set default false;
|
||||||
|
|
||||||
DELETE FROM ttrss_user_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE');
|
alter table ttrss_feeds add column update_on_checksum_change boolean;
|
||||||
|
update ttrss_feeds set update_on_checksum_change = false;
|
||||||
|
alter table ttrss_feeds alter column update_on_checksum_change set not null;
|
||||||
|
alter table ttrss_feeds alter column update_on_checksum_change set default false;
|
||||||
|
|
||||||
DELETE FROM ttrss_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE');
|
DELETE FROM ttrss_user_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE', 'UPDATE_POST_ON_CHECKSUM_CHANGE');
|
||||||
|
|
||||||
|
DELETE FROM ttrss_prefs WHERE pref_name IN ('HIDE_FEEDLIST', 'SYNC_COUNTERS', 'ENABLE_LABELS', 'ENABLE_SEARCH_TOOLBAR', 'ENABLE_FEED_ICONS', 'ENABLE_OFFLINE_READING', 'EXTENDED_FEEDLIST', 'OPEN_LINKS_IN_NEW_WINDOW', 'ENABLE_FLASH_PLAYER', 'HEADLINES_SMART_DATE', 'MARK_UNREAD_ON_UPDATE', 'UPDATE_POST_ON_CHECKSUM_CHANGE');
|
||||||
|
|
||||||
update ttrss_version set schema_version = 83;
|
update ttrss_version set schema_version = 83;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue