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

@ -11,7 +11,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\XML;
@ -78,7 +77,7 @@ function geonames_post_hook(App $a, array &$item)
/* OK, we're allowed to do our stuff. */
$s = HTTPRequest::fetchUrl('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
$s = DI::httpRequest()->fetchUrl('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
if (!$s) {
return;