diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-22 20:25:47 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-09 10:56:24 +0100 |
commit | 53054b2bf6a919fd4ff9b44b6ad1986f21f488b6 (patch) | |
tree | 39cad52645ce00fbf863ff8e482d10dfcbe7f26c /plugins/pubsubhubbub/pubsubhubbub.php | |
parent | e09bb93e18a333eff8e6a4156f5b58ba9c7d25cd (diff) | |
download | Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.gz Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.tar.zst Shaarli-53054b2bf6a919fd4ff9b44b6ad1986f21f488b6.zip |
Apply PHP Code Beautifier on source code for linter automatic fixes
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); |