mirror of
https://github.com/friendica/friendica
synced 2025-04-28 12:24:23 +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
|
@ -25,8 +25,8 @@ use Friendica\Model\Queue;
|
|||
use Friendica\Model\User;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
use dba;
|
||||
use SimpleXMLElement;
|
||||
|
||||
|
@ -1257,7 +1257,7 @@ class Diaspora
|
|||
|
||||
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
|
||||
|
||||
$envelope = fetch_url($source_url);
|
||||
$envelope = Network::fetchURL($source_url);
|
||||
if ($envelope) {
|
||||
logger("Envelope was fetched.", LOGGER_DEBUG);
|
||||
$x = self::verifyMagicEnvelope($envelope);
|
||||
|
@ -1275,7 +1275,7 @@ class Diaspora
|
|||
$source_url = $server."/p/".urlencode($guid).".xml";
|
||||
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
|
||||
|
||||
$x = fetch_url($source_url);
|
||||
$x = Network::fetchURL($source_url);
|
||||
if (!$x) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Database\DBM;
|
|||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Network;
|
||||
use dba;
|
||||
use DOMDocument;
|
||||
use DOMXPath;
|
||||
|
@ -85,7 +86,7 @@ class PortableContact
|
|||
|
||||
logger('load: ' . $url, LOGGER_DEBUG);
|
||||
|
||||
$s = fetch_url($url);
|
||||
$s = Network::fetchURL($url);
|
||||
|
||||
logger('load: returns ' . $s, LOGGER_DATA);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ namespace Friendica\Protocol;
|
|||
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
/**
|
||||
|
@ -50,7 +51,7 @@ class Salmon
|
|||
$ret[$x] = substr($ret[$x], 5);
|
||||
}
|
||||
} elseif (normalise_link($ret[$x]) == 'http://') {
|
||||
$ret[$x] = fetch_url($ret[$x]);
|
||||
$ret[$x] = Network::fetchURL($ret[$x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue