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

@ -38,7 +38,6 @@ use Friendica\Model\Contact;
use Friendica\Model\Event;
use Friendica\Model\Photo;
use Friendica\Model\Tag;
use Friendica\Network\HTTPRequest;
use Friendica\Object\Image;
use Friendica\Protocol\Activity;
use Friendica\Util\Images;
@ -486,7 +485,7 @@ class BBCode
continue;
}
$curlResult = HTTPRequest::curl($mtch[1], true);
$curlResult = DI::httpRequest()->curl($mtch[1], true);
if (!$curlResult->isSuccess()) {
continue;
}
@ -1107,7 +1106,7 @@ class BBCode
$text = "[url=" . $match[2] . ']' . $match[2] . "[/url]";
// if its not a picture then look if its a page that contains a picture link
$body = HTTPRequest::fetchUrl($match[1]);
$body = DI::httpRequest()->fetchUrl($match[1]);
$doc = new DOMDocument();
@$doc->loadHTML($body);
@ -1186,7 +1185,7 @@ class BBCode
}
// if its not a picture then look if its a page that contains a picture link
$body = HTTPRequest::fetchUrl($match[1]);
$body = DI::httpRequest()->fetchUrl($match[1]);
$doc = new DOMDocument();
@$doc->loadHTML($body);