Review update

Rename function, move others
This commit is contained in:
Adam Magness 2018-01-27 11:13:41 -05:00
parent 0f1be37279
commit f04d40a37e
55 changed files with 331 additions and 326 deletions

View file

@ -38,7 +38,7 @@ class CheckVersion {
logger("Checking VERSION from: ".$checked_url, LOGGER_DEBUG);
// fetch the VERSION file
$gitversion = dbesc(trim(Network::fetchURL($checked_url)));
$gitversion = dbesc(trim(Network::fetchUrl($checked_url)));
logger("Upstream VERSION is: ".$gitversion, LOGGER_DEBUG);
Config::set('system', 'git_friendica_version', $gitversion);

View file

@ -15,7 +15,6 @@ use Friendica\Model\User;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Email;
use Friendica\Util\Network;
use dba;
require_once 'include/html2plain.php';
@ -300,7 +299,7 @@ class Delivery {
}
$ssl_policy = Config::get('system','ssl_policy');
Network::fixContactSslPolicy($x[0], $ssl_policy);
$x[0] = Contact::updateSslPolicy($x[0], $ssl_policy);
// If we are setup as a soapbox we aren't accepting top level posts from this person

View file

@ -12,8 +12,10 @@ use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Util\Network;
class Directory {
public static function execute($url = '') {
class Directory
{
public static function execute($url = '')
{
$dir = Config::get('system', 'directory');
if (!strlen($dir)) {
@ -33,7 +35,7 @@ class Directory {
logger('Updating directory: ' . $arr['url'], LOGGER_DEBUG);
if (strlen($arr['url'])) {
Network::fetchURL($dir . '?url=' . bin2hex($arr['url']));
Network::fetchUrl($dir . '?url=' . bin2hex($arr['url']));
}
return;

View file

@ -218,7 +218,7 @@ class DiscoverPoCo {
}
}
$x = Network::fetchURL(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)) {
@ -281,7 +281,7 @@ class DiscoverPoCo {
$url = "http://gstools.org/api/users_search/".urlencode($search);
$result = Network::zFetchURL($url);
$result = Network::curl($url);
if (!$result["success"]) {
return false;
}

View file

@ -11,6 +11,7 @@ use Friendica\Model\Contact;
use Friendica\Protocol\Email;
use Friendica\Protocol\PortableContact;
use Friendica\Util\Network;
use Friendica\Util\XML;
use dba;
require_once 'include/dba.php';
@ -177,7 +178,7 @@ class OnePoll
. '&type=data&last_update=' . $last_update
. '&perm=' . $perm ;
$ret = Network::zFetchURL($url);
$ret = Network::curl($url);
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
// set the last-update so we don't keep polling
@ -219,7 +220,7 @@ class OnePoll
}
$res = Network::parseXmlString($handshake_xml);
$res = XML::parseString($handshake_xml);
if (intval($res->status) == 1) {
logger("$url replied status 1 - marking for death ");
@ -281,7 +282,7 @@ class OnePoll
$postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
$postvars['perm'] = 'rw';
$xml = Network::postURL($contact['poll'], $postvars);
$xml = Network::post($contact['poll'], $postvars);
} elseif (($contact['network'] === NETWORK_OSTATUS)
|| ($contact['network'] === NETWORK_DIASPORA)
@ -312,7 +313,7 @@ class OnePoll
}
$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
$ret = Network::zFetchURL($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
$ret = Network::curl($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
unlink($cookiejar);
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {

View file

@ -69,7 +69,7 @@ class PubSubPublish {
logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG);
Network::postURL($rr['callback_url'], $params, $headers);
Network::post($rr['callback_url'], $params, $headers);
$ret = $a->get_curl_code();
if ($ret >= 200 && $ret <= 299) {