summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-24 21:28:54 +0400
committerAndrew Dolgov <[email protected]>2011-04-24 21:30:02 +0400
commitc57983b1e3d93ac7e1fc3b628bf2011958f4f01b (patch)
treebb5102d8b4e911c368c86ba5e256d682a71fa339 /functions.php
parent8fbd837390ca9dfbfb53506ea906a48a8479f87c (diff)
update_rss_feed: add some PUSH debugging
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 389aece1b..5d77a54fe 100644
--- a/functions.php
+++ b/functions.php
@@ -779,6 +779,8 @@
if ($pubsub_state != 2) {
+ _debug("update_rss_feed: checking for PUSH hub...");
+
$feed_hub_url = false;
if ($use_simplepie) {
$links = $rss->get_links('hub');
@@ -811,13 +813,18 @@
}
}
+ _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'");