summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-01 09:36:29 +0400
committerAndrew Dolgov <[email protected]>2011-04-01 09:36:29 +0400
commitb0f379dfff8738defba307341887ee5938625f55 (patch)
treed010c9bd98d2b3f992036fa19fce6bd91d5a0c33 /modules
parent6f1c5d1760a8a6f753cf35098d45507ed18d0f71 (diff)
add experimental support for pubsubhubbub in published feed, bump config version (refs #251)
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php15
1 files changed, 14 insertions, 1 deletions
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;
}