Make "HTTPRequest::curl" dynamic

This commit is contained in:
nupplaPhil
2020-03-04 22:15:46 +01:00
committed by Hypolite Petovan
parent 9d00e4f1bc
commit 2973ed6448
20 changed files with 72 additions and 84 deletions

View File

@@ -291,7 +291,7 @@ class OnePoll
. '&type=data&last_update=' . $last_update
. '&perm=' . $perm;
$curlResult = HTTPRequest::curl($url);
$curlResult = DI::httpRequest()->curl($url);
if (!$curlResult->isSuccess() && ($curlResult->getErrorNumber() == CURLE_OPERATION_TIMEDOUT)) {
// set the last-update so we don't keep polling
@@ -444,7 +444,7 @@ class OnePoll
}
$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
$curlResult = HTTPRequest::curl($contact['poll'], false, ['cookiejar' => $cookiejar]);
$curlResult = DI::httpRequest()->curl($contact['poll'], false, ['cookiejar' => $cookiejar]);
unlink($cookiejar);
if ($curlResult->isTimeout()) {