mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 11:58:53 +00:00
[ticket/14492] Use new guzzlehttp client
PHPBB3-14492
This commit is contained in:
parent
4451db9f22
commit
cba4f4f568
1 changed files with 9 additions and 10 deletions
|
@ -87,20 +87,19 @@ class acp_help_phpbb
|
||||||
|
|
||||||
if ($config['help_send_statistics'])
|
if ($config['help_send_statistics'])
|
||||||
{
|
{
|
||||||
$client = new \Guzzle\Http\Client(
|
$client = new \GuzzleHttp\Client([
|
||||||
$this->u_action,
|
|
||||||
array(
|
|
||||||
'timeout' => 6,
|
'timeout' => 6,
|
||||||
'connect_timeout' => 6,
|
'connect_timeout' => 6,
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
$collect_request = $client->post($collect_url, [], [
|
|
||||||
'systemdata' => $collector->get_data_for_form(),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$response = $collect_request->send();
|
$response = $client->post($collect_url, [
|
||||||
if ($response->isSuccessful())
|
'body' => [
|
||||||
|
'systemdata' => $collector->get_data_for_form(),
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
$response_status = $response->getStatusCode();
|
||||||
|
|
||||||
|
if ($response_status >= 200 && $response_status < 300)
|
||||||
{
|
{
|
||||||
trigger_error($user->lang('THANKS_SEND_STATISTICS') . adm_back_link($this->u_action));
|
trigger_error($user->lang('THANKS_SEND_STATISTICS') . adm_back_link($this->u_action));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue