From: Michael Vogel Date: Sat, 25 Jul 2020 07:50:01 +0000 (+0200) Subject: Merge pull request #1006 from MrPetovan/task/curl_DI X-Git-Tag: 2020.09^2~13 X-Git-Url: https://reisub.nsupdate.info/git/?p=friendica-addons.git%2F.git;a=commitdiff_plain;h=2c69a9c3597c7363b5ebf3010f276e0225dff35c Merge pull request #1006 from MrPetovan/task/curl_DI Introduce "HTTPRequest" class --- 2c69a9c3597c7363b5ebf3010f276e0225dff35c diff --cc curweather/curweather.php index 93141f23,575c5503..2ee55b26 --- a/curweather/curweather.php +++ b/curweather/curweather.php @@@ -49,10 -48,10 +48,10 @@@ function getWeather($loc, $units = 'met } try { - $res = new SimpleXMLElement(Network::fetchUrl($url)); + $res = new SimpleXMLElement(DI::httpRequest()->fetch($url)); } catch (Exception $e) { if (empty($_SESSION['curweather_notice_shown'])) { - info(DI::l10n()->t('Error fetching weather data. Error was: '.$e->getMessage())); + notice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage())); $_SESSION['curweather_notice_shown'] = true; }