- $post_needs_update = false;
- $update_insignificant = false;
-
- if ($orig_num_comments != $num_comments) {
- $post_needs_update = true;
- $update_insignificant = true;
- }
-
- if ($entry_plugin_data != $orig_plugin_data) {
- $post_needs_update = true;
- $update_insignificant = true;
- }
-
- if ($content_hash != $orig_content_hash) {
- $post_needs_update = true;
- $update_insignificant = false;
- }
-
- if (db_escape_string($orig_title) != $entry_title) {
- $post_needs_update = true;
- $update_insignificant = false;
- }
-
- // if post needs update, update it and mark all user entries
- // linking to this post as updated
- if ($post_needs_update) {
-
- if (defined('DAEMON_EXTENDED_DEBUG')) {
- _debug("post $entry_guid_hashed needs update...", $debug_enabled);
- }
-
-// print "<!-- post $orig_title needs update : $post_needs_update -->";
-
- db_query("UPDATE ttrss_entries
- SET title = '$entry_title', content = '$entry_content',
- content_hash = '$content_hash',
- updated = '$entry_timestamp_fmt',
- num_comments = '$num_comments',
- plugin_data = '$entry_plugin_data'
- WHERE id = '$ref_id'");
-
- if (!$update_insignificant) {
- if ($mark_unread_on_update) {
- db_query("UPDATE ttrss_user_entries
- SET last_read = null, unread = true WHERE ref_id = '$ref_id'");
- }
- }
+ db_query("UPDATE ttrss_entries
+ SET title = '$entry_title',
+ content = '$entry_content',
+ content_hash = '$entry_current_hash',
+ updated = '$entry_timestamp_fmt',
+ num_comments = '$num_comments',
+ plugin_data = '$entry_plugin_data',
+ author = '$entry_author',
+ lang = '$entry_language'
+ WHERE id = '$ref_id'");
+
+ if ($mark_unread_on_update) {
+ db_query("UPDATE ttrss_user_entries
+ SET last_read = null, unread = true WHERE ref_id = '$ref_id'");