Move ACCEPT constants to own "enum" class

This commit is contained in:
Philipp 2022-04-02 20:26:11 +02:00
parent c700645385
commit 73c3b21665
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
35 changed files with 144 additions and 138 deletions

View file

@ -32,7 +32,7 @@ use Friendica\Core\Renderer;
use Friendica\Database\Database;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
@ -98,7 +98,7 @@ class OEmbed
if (!in_array($ext, $noexts)) {
// try oembed autodiscovery
$html_text = DI::httpClient()->fetch($embedurl, 15, HttpClient::ACCEPT_HTML);
$html_text = DI::httpClient()->fetch($embedurl, 15, HttpClientAccept::HTML);
if (!empty($html_text)) {
$dom = new DOMDocument();
if (@$dom->loadHTML($html_text)) {