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

@ -24,7 +24,7 @@ namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Network\HTTPClient\Client\HttpClient;
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
/**
* Check the git repository VERSION file and save the version to the DB
@ -55,7 +55,7 @@ class CheckVersion
Logger::info("Checking VERSION from: ".$checked_url);
// fetch the VERSION file
$gitversion = DBA::escape(trim(DI::httpClient()->fetch($checked_url, 0, HttpClient::ACCEPT_TEXT)));
$gitversion = DBA::escape(trim(DI::httpClient()->fetch($checked_url, 0, HttpClientAccept::TEXT)));
Logger::notice("Upstream VERSION is: ".$gitversion);
DI::config()->set('system', 'git_friendica_version', $gitversion);