Network was moved to src

update all function calls to use class, insert use statements and remove require_once statements
This commit is contained in:
Adam Magness 2018-01-27 08:52:02 -05:00
parent e09e16fd56
commit ca3c45101e
19 changed files with 76 additions and 71 deletions

View file

@ -9,7 +9,6 @@
*
*/
require_once 'include/network.php';
require_once 'mod/proxy.php';
require_once 'include/text.php';
@ -18,6 +17,7 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
// get the weather data from OpenWeatherMap
function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0) {
@ -32,7 +32,7 @@ function getWeather( $loc, $units='metric', $lang='en', $appid='', $cachetime=0)
}
}
try {
$res = new SimpleXMLElement(fetch_url($url));
$res = new SimpleXMLElement(Network::fetchURL($url));
} catch (Exception $e) {
info(L10n::t('Error fetching weather data.\nError was: '.$e->getMessage()));
return false;