]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge pull request #1006 from MrPetovan/task/curl_DI
authorMichael Vogel <icarus@dabo.de>
Sat, 25 Jul 2020 07:50:01 +0000 (09:50 +0200)
committerGitHub <noreply@github.com>
Sat, 25 Jul 2020 07:50:01 +0000 (09:50 +0200)
Introduce "HTTPRequest" class

1  2 
curweather/curweather.php
geocoordinates/geocoordinates.php
geonames/geonames.php
jappixmini/jappixmini.php
openstreetmap/openstreetmap.php
statusnet/statusnet.php
twitter/twitter.php

index 93141f233606f67c3d90a5c880d195f2e564a6ca,575c5503a3a9a64cc9afb8237d28253d17430822..2ee55b2643dae6ee1b2c78ee0902ae9b790c8b29
@@@ -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;
                }
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge