]> git.wh0rd.org - tt-rss.git/commitdiff
update_rss_feed: properly handle update_insignificant
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 27 Apr 2011 12:03:24 +0000 (16:03 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 27 Apr 2011 12:03:24 +0000 (16:03 +0400)
functions.php

index fc50bd46ea341c72fdaefe501b5b2867c1affa89..d3f64b58f596908c1b204c0824e1bb87915bd3d1 100644 (file)
                                        $post_needs_update = false;
                                        $update_insignificant = false;
 
-                                       if ($content_hash != $orig_content_hash) {
-//                                             print "<!-- [$entry_title] $content_hash vs $orig_content_hash -->";
+                                       if ($orig_num_comments != $num_comments) {
                                                $post_needs_update = true;
+                                               $update_insignificant = true;
                                        }
 
-                                       if (db_escape_string($orig_title) != $entry_title) {
+                                       if ($content_hash != $orig_content_hash) {
                                                $post_needs_update = true;
+                                               $update_insignificant = false;
                                        }
 
-                                       if ($orig_num_comments != $num_comments) {
+                                       if (db_escape_string($orig_title) != $entry_title) {
                                                $post_needs_update = true;
-                                               $update_insignificant = true;
+                                               $update_insignificant = false;
                                        }
 
-//                                     this doesn't seem to be very reliable
-//
-//                                     if ($orig_timestamp != $entry_timestamp && !$orig_no_orig_date) {
-//                                             $post_needs_update = true;
-//                                     }
-
                                        // if post needs update, update it and mark all user entries
                                        // linking to this post as updated
                                        if ($post_needs_update) {