]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/CheckVersion.php
Merge pull request #5997 from annando/notice-relocation
[friendica.git] / src / Worker / CheckVersion.php
index a6056ccbc477b08c7a176a737a190eb53daa0c98..3aec6cac17c5e64aa0e31cf29c5645aaf71c933f 100644 (file)
@@ -8,6 +8,7 @@
 namespace Friendica\Worker;
 
 use Friendica\Core\Config;
+use Friendica\Database\DBA;
 use Friendica\Util\Network;
 
 /**
@@ -16,10 +17,10 @@ use Friendica\Util\Network;
  * Checking the upstream version is optional (opt-in) and can be done to either
  * the master or the develop branch in the repository.
  */
-class CheckVersion {
-       public static function execute() {
-               global $a;
-
+class CheckVersion
+{
+       public static function execute()
+       {
                logger('checkversion: start');
 
                $checkurl = Config::get('system', 'check_new_version_url', 'none');
@@ -38,7 +39,7 @@ class CheckVersion {
                logger("Checking VERSION from: ".$checked_url, LOGGER_DEBUG);
 
                // fetch the VERSION file
-               $gitversion = dbesc(trim(Network::fetchUrl($checked_url)));
+               $gitversion = DBA::escape(trim(Network::fetchUrl($checked_url)));
                logger("Upstream VERSION is: ".$gitversion, LOGGER_DEBUG);
 
                Config::set('system', 'git_friendica_version', $gitversion);