X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FOEmbed.php;h=b09fd2249535a2914548bf3ef99020b279335aa8;hb=0a13ab6b9f81fe46698386a197e280859cb10f67;hp=9f1df5174566bdca08e5be7493ad5d70fcb35c22;hpb=30c1cc0e8cec5438fd8fe36bd4ea00991dc01934;p=friendica.git diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index 9f1df51745..b09fd22495 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -1,4 +1,5 @@ query("//link[@type='application/json+oembed']"); foreach ($entries as $e) { $href = $e->getAttributeNode("href")->nodeValue; - $txt = fetch_url($href . '&maxwidth=' . $a->videowidth); + $txt = Network::fetchUrl($href . '&maxwidth=' . $a->videowidth); break; } $entries = $xpath->query("//link[@type='text/json+oembed']"); foreach ($entries as $e) { $href = $e->getAttributeNode("href")->nodeValue; - $txt = fetch_url($href . '&maxwidth=' . $a->videowidth); + $txt = Network::fetchUrl($href . '&maxwidth=' . $a->videowidth); break; } } @@ -109,7 +113,7 @@ class OEmbed 'url' => normalise_link($embedurl), 'maxwidth' => $a->videowidth, 'content' => $txt, - 'created' => datetime_convert() + 'created' => DateTimeFormat::utcNow() ], true); } @@ -311,7 +315,7 @@ class OEmbed $allowed = explode(',', $str_allowed); - return allowed_domain($domain, $allowed); + return Network::isDomainAllowed($domain, $allowed); } public static function getHTML($url, $title = null)