$result = db_query($link, "SELECT id,update_interval,auth_login,
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'");
}
$last_updated = db_fetch_result($result, 0, "last_updated");
$owner_uid = db_fetch_result($result, 0, "owner_uid");
$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()
WHERE id = '$feed'");
$post_needs_update = false;
- if (get_pref($link, "UPDATE_POST_ON_CHECKSUM_CHANGE", $owner_uid, false) &&
- ($content_hash != $orig_content_hash)) {
+ if ($update_on_checksum_change && $content_hash != $orig_content_hash) {
// print "<!-- [$entry_title] $content_hash vs $orig_content_hash -->";
$post_needs_update = true;
}
name=\"mark_unread_on_update\"
$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 " "; 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>";
$mark_unread_on_update = checkbox_to_sql_bool(
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 ($cat_id && $cat_id != 0) {
$category_qpart = "cat_id = '$cat_id',";
include_in_digest = $include_in_digest,
always_display_enclosures = $always_display_enclosures,
mark_unread_on_update = $mark_unread_on_update,
+ update_on_checksum_change = $update_on_checksum_change,
update_method = '$update_method'
WHERE id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
$qpart = "mark_unread_on_update = '$mark_unread_on_update'";
break;
+ case "update_on_checksum_change":
+ $qpart = "update_on_checksum_change = '$update_on_checksum_change'";
+ break;
+
case "cache_images":
$qpart = "cache_images = '$cache_images'";
break;
update_method integer not null default 0,
order_id integer not null default 0,
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,
index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
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('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);
always_display_enclosures boolean not null default false,
order_id integer not null default 0,
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,
auth_pass_encrypted boolean not null default false);
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('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);
alter table ttrss_feeds change strip_images strip_images boolean not null;
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;
alter table ttrss_feeds alter column strip_images set not null;
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;