mirror of
https://github.com/friendica/friendica
synced 2025-04-27 03:10:12 +00:00
Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull"
This commit is contained in:
parent
7029012f27
commit
657d08f09f
20 changed files with 32 additions and 34 deletions
|
@ -95,7 +95,7 @@ class OEmbed
|
|||
|
||||
if (!in_array($ext, $noexts)) {
|
||||
// try oembed autodiscovery
|
||||
$html_text = DI::httpRequest()->fetchUrl($embedurl, false, 15, 'text/*');
|
||||
$html_text = DI::httpRequest()->fetch($embedurl, false, 15, 'text/*');
|
||||
if ($html_text) {
|
||||
$dom = @DOMDocument::loadHTML($html_text);
|
||||
if ($dom) {
|
||||
|
@ -103,14 +103,14 @@ class OEmbed
|
|||
$entries = $xpath->query("//link[@type='application/json+oembed']");
|
||||
foreach ($entries as $e) {
|
||||
$href = $e->getAttributeNode('href')->nodeValue;
|
||||
$json_string = DI::httpRequest()->fetchUrl($href . '&maxwidth=' . $a->videowidth);
|
||||
$json_string = DI::httpRequest()->fetch($href . '&maxwidth=' . $a->videowidth);
|
||||
break;
|
||||
}
|
||||
|
||||
$entries = $xpath->query("//link[@type='text/json+oembed']");
|
||||
foreach ($entries as $e) {
|
||||
$href = $e->getAttributeNode('href')->nodeValue;
|
||||
$json_string = DI::httpRequest()->fetchUrl($href . '&maxwidth=' . $a->videowidth);
|
||||
$json_string = DI::httpRequest()->fetch($href . '&maxwidth=' . $a->videowidth);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1106,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 = DI::httpRequest()->fetchUrl($match[1]);
|
||||
$body = DI::httpRequest()->fetch($match[1]);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML($body);
|
||||
|
@ -1185,7 +1185,7 @@ class BBCode
|
|||
}
|
||||
|
||||
// if its not a picture then look if its a page that contains a picture link
|
||||
$body = DI::httpRequest()->fetchUrl($match[1]);
|
||||
$body = DI::httpRequest()->fetch($match[1]);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML($body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue