]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/CheckVersion.php
New parameter to create a share block for display reasons
[friendica.git] / src / Worker / CheckVersion.php
index 14ebd87380a072527feb6f06e23782261f927b1b..f4c45fe33d5dd022dbcef71f2a103b673e2e9361 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -24,6 +24,7 @@ namespace Friendica\Worker;
 use Friendica\Core\Logger;
 use Friendica\Database\DBA;
 use Friendica\DI;
+use Friendica\Network\HTTPClient\Client\HttpClientAccept;
 
 /**
  * Check the git repository VERSION file and save the version to the DB
@@ -54,10 +55,10 @@ class CheckVersion
                Logger::info("Checking VERSION from: ".$checked_url);
 
                // fetch the VERSION file
-               $gitversion = DBA::escape(trim(DI::httpClient()->fetch($checked_url)));
+               $gitversion = DBA::escape(trim(DI::httpClient()->fetch($checked_url, HttpClientAccept::TEXT)));
                Logger::notice("Upstream VERSION is: ".$gitversion);
 
-               DI::config()->set('system', 'git_friendica_version', $gitversion);
+               DI::keyValue()->set('git_friendica_version', $gitversion);
 
                Logger::notice('checkversion: end');