mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"
This commit is contained in:
parent
31bd1a1ba0
commit
9640142a72
18 changed files with 50 additions and 45 deletions
|
@ -15,7 +15,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
function curweather_install()
|
||||
|
@ -49,7 +49,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
|
|||
}
|
||||
|
||||
try {
|
||||
$res = new SimpleXMLElement(Network::fetchUrl($url));
|
||||
$res = new SimpleXMLElement(HTTPRequest::fetchUrl($url));
|
||||
} catch (Exception $e) {
|
||||
if (empty($_SESSION['curweather_notice_shown'])) {
|
||||
info(DI::l10n()->t('Error fetching weather data. Error was: '.$e->getMessage()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue