Make "HTTPRequest::fetchUrl" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:20:27 +01:00 committed by Hypolite Petovan
parent fed6e3cde1
commit 40ff1d7fda
7 changed files with 12 additions and 19 deletions

View file

@ -10,7 +10,6 @@ use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Network\HTTPRequest;
use Friendica\Util\Strings;
function geocoordinates_install()
@ -53,7 +52,7 @@ function geocoordinates_resolve_item(&$item)
return;
}
$s = HTTPRequest::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=" . $coords[0] . "," . $coords[1] . "&key=" . $key . "&language=" . $language);
$s = DI::httpRequest()->fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=" . $coords[0] . "," . $coords[1] . "&key=" . $key . "&language=" . $language);
if (!$s) {
Logger::log("API could not be queried", Logger::DEBUG);