Make "HTTPRequest::fetchUrl" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:20:28 +01:00 committed by Hypolite Petovan
parent 3b4cf87c95
commit 1aa07f87a4
20 changed files with 26 additions and 46 deletions

View file

@ -41,7 +41,6 @@ use Friendica\Model\Mail;
use Friendica\Model\Post;
use Friendica\Model\Tag;
use Friendica\Model\User;
use Friendica\Network\HTTPRequest;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
@ -1380,7 +1379,7 @@ class Diaspora
Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
$envelope = HTTPRequest::fetchUrl($source_url);
$envelope = DI::httpRequest()->fetchUrl($source_url);
if ($envelope) {
Logger::log("Envelope was fetched.", Logger::DEBUG);
$x = self::verifyMagicEnvelope($envelope);

View file

@ -22,7 +22,6 @@
namespace Friendica\Protocol;
use Friendica\Core\Logger;
use Friendica\Network\HTTPRequest;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\Strings;
@ -72,7 +71,7 @@ class Salmon
$ret[$x] = substr($ret[$x], 5);
}
} elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
$ret[$x] = HTTPRequest::fetchUrl($ret[$x]);
$ret[$x] = DI::httpRequest()->fetchUrl($ret[$x]);
}
}
}