update_rss_feed: fix article update detection
This commit is contained in:
parent
8d03971834
commit
7e43ad58a6
|
@ -589,7 +589,6 @@
|
||||||
// print "<br>";
|
// print "<br>";
|
||||||
|
|
||||||
$entry_content_unescaped = $entry_content;
|
$entry_content_unescaped = $entry_content;
|
||||||
$content_hash = "SHA1:" . sha1(strip_tags($entry_content));
|
|
||||||
|
|
||||||
$entry_comments = strip_tags($item["comments"]);
|
$entry_comments = strip_tags($item["comments"]);
|
||||||
|
|
||||||
|
@ -621,6 +620,9 @@
|
||||||
WHERE guid = '$entry_guid'");
|
WHERE guid = '$entry_guid'");
|
||||||
|
|
||||||
$entry_content = db_escape_string($entry_content);
|
$entry_content = db_escape_string($entry_content);
|
||||||
|
|
||||||
|
$content_hash = "SHA1:" . sha1(strip_tags($entry_content));
|
||||||
|
|
||||||
$entry_title = db_escape_string($entry_title);
|
$entry_title = db_escape_string($entry_title);
|
||||||
$entry_link = db_escape_string($entry_link);
|
$entry_link = db_escape_string($entry_link);
|
||||||
$entry_comments = db_escape_string($entry_comments);
|
$entry_comments = db_escape_string($entry_comments);
|
||||||
|
@ -808,10 +810,11 @@
|
||||||
|
|
||||||
if (get_pref($link, "UPDATE_POST_ON_CHECKSUM_CHANGE", $owner_uid, false) &&
|
if (get_pref($link, "UPDATE_POST_ON_CHECKSUM_CHANGE", $owner_uid, false) &&
|
||||||
($content_hash != $orig_content_hash)) {
|
($content_hash != $orig_content_hash)) {
|
||||||
|
// print "<!-- [$entry_title] $content_hash vs $orig_content_hash -->";
|
||||||
$post_needs_update = true;
|
$post_needs_update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($orig_title != $entry_title) {
|
if (db_escape_string($orig_title) != $entry_title) {
|
||||||
$post_needs_update = true;
|
$post_needs_update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -837,6 +840,7 @@
|
||||||
|
|
||||||
db_query($link, "UPDATE ttrss_entries
|
db_query($link, "UPDATE ttrss_entries
|
||||||
SET title = '$entry_title', content = '$entry_content',
|
SET title = '$entry_title', content = '$entry_content',
|
||||||
|
content_hash = '$content_hash',
|
||||||
num_comments = '$num_comments'
|
num_comments = '$num_comments'
|
||||||
WHERE id = '$ref_id'");
|
WHERE id = '$ref_id'");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue