forked from friendica/friendica-addons
Make "HTTPRequest::fetchUrlFull" dynamic
This commit is contained in:
parent
20056dc795
commit
fed6e3cde1
|
@ -169,7 +169,7 @@ function mailstream_do_images($a, &$item, &$attachments) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
|
$cookiejar = tempnam(get_temppath(), 'cookiejar-mailstream-');
|
||||||
$curlResult = HTTPRequest::fetchUrlFull($url, true, 0, '', $cookiejar);
|
$curlResult = DI::httpRequest()->fetchUrlFull($url, true, 0, '', $cookiejar);
|
||||||
$attachments[$url] = [
|
$attachments[$url] = [
|
||||||
'data' => $curlResult->getBody(),
|
'data' => $curlResult->getBody(),
|
||||||
'guid' => hash("crc32", $url),
|
'guid' => hash("crc32", $url),
|
||||||
|
|
|
@ -90,7 +90,7 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url)
|
||||||
|
|
||||||
$api_url = $api_base_url . '/api/v1/custom_emojis';
|
$api_url = $api_base_url . '/api/v1/custom_emojis';
|
||||||
|
|
||||||
$fetchResult = HTTPRequest::fetchUrlFull($api_url);
|
$fetchResult = DI::httpRequest()->fetchUrlFull($api_url);
|
||||||
|
|
||||||
if ($fetchResult->isSuccess()) {
|
if ($fetchResult->isSuccess()) {
|
||||||
$emojis_array = json_decode($fetchResult->getBody(), true);
|
$emojis_array = json_decode($fetchResult->getBody(), true);
|
||||||
|
|
Loading…
Reference in a new issue