From b0f379dfff8738defba307341887ee5938625f55 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Apr 2011 09:36:29 +0400 Subject: add experimental support for pubsubhubbub in published feed, bump config version (refs #251) --- modules/backend-rpc.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'modules/backend-rpc.php') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 1810d585e..abb04ab46 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -211,7 +211,20 @@ published = $pub WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); - print json_encode(array("message" => "UPDATE_COUNTERS")); + $pubsub_result = false; + + if (PUBSUBHUBBUB_HUB) { + $rss_link = get_self_url_prefix() . + "/backend.php?op=rss&id=-2&key=" . + get_feed_access_key($link, -2, false); + + $p = new Publisher(PUBSUBHUBBUB_HUB); + + $pubsub_result = $p->publish_update($rss_link); + } + + print json_encode(array("message" => "UPDATE_COUNTERS", + "pubsub_result" => $pubsub_result)); return; } -- cgit v1.2.3-54-g00ecf