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

@@@ -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