diff options
Diffstat (limited to 'plugins/pubsubhubbub/pubsubhubbub.php')
-rw-r--r-- | plugins/pubsubhubbub/pubsubhubbub.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/pubsubhubbub/pubsubhubbub.php b/plugins/pubsubhubbub/pubsubhubbub.php index 8fe6799c..299b84fb 100644 --- a/plugins/pubsubhubbub/pubsubhubbub.php +++ b/plugins/pubsubhubbub/pubsubhubbub.php | |||
@@ -42,7 +42,7 @@ function pubsubhubbub_init($conf) | |||
42 | function hook_pubsubhubbub_render_feed($data, $conf) | 42 | function hook_pubsubhubbub_render_feed($data, $conf) |
43 | { | 43 | { |
44 | $feedType = $data['_PAGE_'] == TemplatePage::FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM; | 44 | $feedType = $data['_PAGE_'] == TemplatePage::FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM; |
45 | $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.'. $feedType .'.xml'); | 45 | $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.' . $feedType . '.xml'); |
46 | $data['feed_plugins_header'][] = sprintf($template, $conf->get('plugins.PUBSUBHUB_URL')); | 46 | $data['feed_plugins_header'][] = sprintf($template, $conf->get('plugins.PUBSUBHUB_URL')); |
47 | 47 | ||
48 | return $data; | 48 | return $data; |
@@ -59,10 +59,10 @@ function hook_pubsubhubbub_render_feed($data, $conf) | |||
59 | */ | 59 | */ |
60 | function hook_pubsubhubbub_save_link($data, $conf) | 60 | function hook_pubsubhubbub_save_link($data, $conf) |
61 | { | 61 | { |
62 | $feeds = array( | 62 | $feeds = [ |
63 | index_url($_SERVER) .'feed/atom', | 63 | index_url($_SERVER) . 'feed/atom', |
64 | index_url($_SERVER) .'feed/rss', | 64 | index_url($_SERVER) . 'feed/rss', |
65 | ); | 65 | ]; |
66 | 66 | ||
67 | $httpPost = function_exists('curl_version') ? false : 'nocurl_http_post'; | 67 | $httpPost = function_exists('curl_version') ? false : 'nocurl_http_post'; |
68 | try { | 68 | try { |
@@ -87,11 +87,11 @@ function hook_pubsubhubbub_save_link($data, $conf) | |||
87 | */ | 87 | */ |
88 | function nocurl_http_post($url, $postString) | 88 | function nocurl_http_post($url, $postString) |
89 | { | 89 | { |
90 | $params = array('http' => array( | 90 | $params = ['http' => [ |
91 | 'method' => 'POST', | 91 | 'method' => 'POST', |
92 | 'content' => $postString, | 92 | 'content' => $postString, |
93 | 'user_agent' => 'PubSubHubbub-Publisher-PHP/1.0', | 93 | 'user_agent' => 'PubSubHubbub-Publisher-PHP/1.0', |
94 | )); | 94 | ]]; |
95 | 95 | ||
96 | $context = stream_context_create($params); | 96 | $context = stream_context_create($params); |
97 | $fp = @fopen($url, 'rb', false, $context); | 97 | $fp = @fopen($url, 'rb', false, $context); |