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
|
@ -23,6 +23,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
function geonames_install() {
|
||||
|
||||
|
@ -111,12 +112,12 @@ function geonames_post_hook($a, &$item) {
|
|||
*
|
||||
*/
|
||||
|
||||
$s = fetch_url('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
|
||||
$s = Network::fetchURL('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
|
||||
|
||||
if(! $s)
|
||||
return;
|
||||
|
||||
$xml = parse_xml_string($s);
|
||||
$xml = Network::parseXmlString($s);
|
||||
|
||||
if($xml->geoname->name && $xml->geoname->countryName)
|
||||
$item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue