summaryrefslogtreecommitdiff
path: root/plugins/PubSubHubBub/PubSubHubBubPlugin.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-01-22 17:20:10 -0500
committerCraig Andrews <candrews@integralblue.com>2010-01-22 17:20:10 -0500
commit611924e814320c768771af21a923e615118c1feb (patch)
treeb731af5d447c3b852e2261910abd54b06f5a6177 /plugins/PubSubHubBub/PubSubHubBubPlugin.php
parent78eb9c78a781ba8d6929a260e5f9c07714d59ee3 (diff)
parentb157fcbba3c4c105945d18dfa11732ba02e7222b (diff)
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'plugins/PubSubHubBub/PubSubHubBubPlugin.php')
-rw-r--r--plugins/PubSubHubBub/PubSubHubBubPlugin.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/plugins/PubSubHubBub/PubSubHubBubPlugin.php b/plugins/PubSubHubBub/PubSubHubBubPlugin.php
index 8286cd548..ce6086df9 100644
--- a/plugins/PubSubHubBub/PubSubHubBubPlugin.php
+++ b/plugins/PubSubHubBub/PubSubHubBubPlugin.php
@@ -211,13 +211,20 @@ class PubSubHubBubPlugin extends Plugin
'format' => 'atom'));
}
}
-
- foreach (array_unique($feeds) as $feed) {
- if (!$publisher->publish_update($feed)) {
- common_log_line(LOG_WARNING,
- $feed.' was not published to hub at '.
- $this->hub.':'.$publisher->last_response());
- }
+ $feeds = array_unique($feeds);
+
+ ob_start();
+ $ok = $publisher->publish_update($feeds);
+ $push_last_response = ob_get_clean();
+
+ if (!$ok) {
+ common_log(LOG_WARNING,
+ 'Failure publishing ' . count($feeds) . ' feeds to hub at '.
+ $this->hub.': '.$push_last_response);
+ } else {
+ common_log(LOG_INFO,
+ 'Published ' . count($feeds) . ' feeds to hub at '.
+ $this->hub.': '.$push_last_response);
}
return true;