summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-22 14:07:40 -0800
committerBrion Vibber <brion@pobox.com>2010-01-22 14:07:40 -0800
commitb157fcbba3c4c105945d18dfa11732ba02e7222b (patch)
treeb731af5d447c3b852e2261910abd54b06f5a6177 /plugins
parentaa038fa9cb2abbf0688daa18a0691945603e3f64 (diff)
parent71b3b9ee2be6973c3f55a59811ae103321c5abcc (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'plugins')
-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;