mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Make "HTTPRequest::curl" dynamic
This commit is contained in:
parent
9640142a72
commit
688c556739
3 changed files with 4 additions and 7 deletions
|
@ -14,7 +14,6 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\ConfigFileLoader;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
@ -132,7 +131,7 @@ function openstreetmap_get_coordinates($a, &$b)
|
|||
$j = DI::cache()->get($cachekey);
|
||||
|
||||
if (is_null($j)) {
|
||||
$curlResult = HTTPRequest::curl($nomserver . $args);
|
||||
$curlResult = DI::httpRequest()->curl($nomserver . $args);
|
||||
if ($curlResult->isSuccess()) {
|
||||
$j = json_decode($curlResult->getBody(), true);
|
||||
DI::cache()->set($cachekey, $j, Duration::MONTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue