]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: add some PUSH debugging
authorAndrew Dolgov <fox@fakecake.org>
Sun, 24 Apr 2011 17:28:54 +0000 (21:28 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Sun, 24 Apr 2011 17:30:02 +0000 (21:30 +0400)
functions.php

index 389aece1ba3857896f85c96b27bff945b1070b3d..5d77a54febd6fb7aea0fe07b597cacf564eb45e5 100644 (file)
 
                        if ($pubsub_state != 2) {
 
+                               _debug("update_rss_feed: checking for PUSH hub...");
+
                                $feed_hub_url = false;
                                if ($use_simplepie) {
                                        $links = $rss->get_links('hub');
                                        }
                                }
 
+                               _debug("update_rss_feed: feed hub url: $feed_hub_url");
+
                                if ($feed_hub_url && function_exists('curl_init')) {
+
                                        $callback_url = get_self_url_prefix() .
                                                "/backend.php?op=pubsub&id=$feed";
 
                                        $s = new Subscriber($feed_hub_url, $callback_url);
 
-                                       $s->subscribe($fetch_url);
+                                       $rc = $s->subscribe($fetch_url);
+
+                                       _debug("update_rss_feed: feed hub url found, subscribe request sent.");
 
                                        db_query($link, "UPDATE ttrss_feeds SET pubsub_state = 1
                                                WHERE id = '$feed'");