mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 03:18:48 +00:00
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:
parent
e09e16fd56
commit
ca3c45101e
19 changed files with 76 additions and 71 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue