]> git.wh0rd.org - tt-rss.git/commitdiff
daemon debugging stuff
authorAndrew Dolgov <fox@madoka.spb.ru>
Sat, 17 Mar 2007 06:37:40 +0000 (07:37 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sat, 17 Mar 2007 06:37:40 +0000 (07:37 +0100)
functions.php

index 1501a871351e6e5353361baabdcb7a2f7b81e2d6..fb38f6b3bd3494c0221a514b644a424778067a3b 100644 (file)
                                if (db_num_rows($result) == 1) {
 
                                        if (defined('DAEMON_EXTENDED_DEBUG')) {
-                                               _debug("update_rss_feed: base guid found, creating user ref");
+                                               _debug("update_rss_feed: base guid found, checking for user record");
                                        }
 
                                        // this will be used below in update handler
                                        $article_filters = get_article_filters($filters, $entry_title, 
                                                        $entry_content, $entry_link);
 
+                                       if (defined('DAEMON_EXTENDED_DEBUG')) {
+                                               _debug("update_rss_feed: article filters: ");
+                                               if (count($article_filters) != 0) {
+                                                       print_r($article_filters);
+                                               }
+                                       }
+
                                        if (find_article_filter($article_filters, "filter")) {
                                                continue;
                                        }
                                                "SELECT ref_id FROM ttrss_user_entries WHERE
                                                        ref_id = '$ref_id' AND owner_uid = '$owner_uid'
                                                        $dupcheck_qpart");
-                                                       
+
                                        // okay it doesn't exist - create user entry
                                        if (db_num_rows($result) == 0) {
 
+                                               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                                                       _debug("update_rss_feed: user record not found, creating...");
+                                               }
+
                                                if (!find_article_filter($article_filters, 'catchup')) {
                                                        $unread = 'true';
                                                        $last_read_qpart = 'NULL';
                                        // linking to this post as updated                                      
                                        if ($post_needs_update) {
 
+                                               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                                                       _debug("update_rss_feed: post $entry_guid needs update...");
+                                               }
+
 //                                             print "<!-- post $orig_title needs update : $post_needs_update -->";
 
                                                db_query($link, "UPDATE ttrss_entries