Make "HTTPRequest::fetchUrl" dynamic
This commit is contained in:
parent
3b4cf87c95
commit
1aa07f87a4
20 changed files with 26 additions and 46 deletions
|
@ -25,7 +25,6 @@ use Friendica\Core\Session;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Protocol\DFRN;
|
||||
use Friendica\Protocol\OStatus;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -115,7 +114,7 @@ function dfrn_poll_init(App $a)
|
|||
);
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
$s = HTTPRequest::fetchUrl($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
|
||||
$s = DI::httpRequest()->fetchUrl($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
|
||||
|
||||
Logger::log("dfrn_poll: old profile returns " . $s, Logger::DATA);
|
||||
|
||||
|
@ -499,7 +498,7 @@ function dfrn_poll_content(App $a)
|
|||
|
||||
// URL reply
|
||||
if ($dfrn_version < 2.2) {
|
||||
$s = HTTPRequest::fetchUrl($r[0]['poll']
|
||||
$s = DI::httpRequest()->fetchUrl($r[0]['poll']
|
||||
. '?dfrn_id=' . $encrypted_id
|
||||
. '&type=profile-check'
|
||||
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
|
||||
|
|
|
@ -39,7 +39,6 @@ use Friendica\Model\Notify\Type;
|
|||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -204,7 +203,7 @@ function dfrn_request_post(App $a)
|
|||
}
|
||||
|
||||
if (!empty($dfrn_request) && strlen($confirm_key)) {
|
||||
HTTPRequest::fetchUrl($dfrn_request . '?confirm_key=' . $confirm_key);
|
||||
DI::httpRequest()->fetchUrl($dfrn_request . '?confirm_key=' . $confirm_key);
|
||||
}
|
||||
|
||||
// (ignore reply, nothing we can do it failed)
|
||||
|
|
|
@ -23,7 +23,6 @@ use Friendica\App;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
function oexchange_init(App $a) {
|
||||
|
@ -58,7 +57,7 @@ function oexchange_content(App $a) {
|
|||
$tags = ((!empty($_REQUEST['tags']))
|
||||
? '&tags=' . urlencode(Strings::escapeTags(trim($_REQUEST['tags']))) : '');
|
||||
|
||||
$s = HTTPRequest::fetchUrl(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags);
|
||||
$s = DI::httpRequest()->fetchUrl(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags);
|
||||
|
||||
if (!strlen($s)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue