mirror of
https://github.com/friendica/friendica
synced 2025-05-05 21:44:11 +02:00
Move fetch_url
move fetch_url function
This commit is contained in:
parent
1b51777825
commit
c67452f72e
25 changed files with 55 additions and 35 deletions
|
@ -8,6 +8,7 @@
|
|||
namespace Friendica\Worker;
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
/**
|
||||
* @brief check the git repository VERSION file and save the version to the DB
|
||||
|
@ -37,7 +38,7 @@ class CheckVersion {
|
|||
logger("Checking VERSION from: ".$checked_url, LOGGER_DEBUG);
|
||||
|
||||
// fetch the VERSION file
|
||||
$gitversion = dbesc(trim(fetch_url($checked_url)));
|
||||
$gitversion = dbesc(trim(Network::fetchURL($checked_url)));
|
||||
logger("Upstream VERSION is: ".$gitversion, LOGGER_DEBUG);
|
||||
|
||||
Config::set('system', 'git_friendica_version', $gitversion);
|
||||
|
|
|
@ -10,6 +10,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
class Directory {
|
||||
public static function execute($url = '') {
|
||||
|
@ -32,7 +33,7 @@ class Directory {
|
|||
|
||||
logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
|
||||
if (strlen($arr['url'])) {
|
||||
fetch_url($dir . '?url=' . bin2hex($arr['url']));
|
||||
Network::fetchURL($dir . '?url=' . bin2hex($arr['url']));
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -11,6 +11,7 @@ use Friendica\Database\DBM;
|
|||
use Friendica\Model\GContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
require_once 'include/datetime.php';
|
||||
|
||||
|
@ -217,7 +218,7 @@ class DiscoverPoCo {
|
|||
}
|
||||
}
|
||||
|
||||
$x = fetch_url(get_server()."/lsearch?p=1&n=500&search=".urlencode($search));
|
||||
$x = Network::fetchURL(get_server()."/lsearch?p=1&n=500&search=".urlencode($search));
|
||||
$j = json_decode($x);
|
||||
|
||||
if (count($j->results)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue