]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/CheckVersion.php
Rename dbesc to DBA::escape
[friendica.git] / src / Worker / CheckVersion.php
index b7e99cb67ec201b9ecc0b72a350abb94c77c3037..6473f64c428472fef067013b5821e3b1f4830f11 100644 (file)
@@ -8,6 +8,7 @@
 namespace Friendica\Worker;
 
 use Friendica\Core\Config;
+use Friendica\Util\Network;
 
 /**
  * @brief check the git repository VERSION file and save the version to the DB
@@ -15,10 +16,10 @@ use Friendica\Core\Config;
  * 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');
@@ -37,7 +38,7 @@ class CheckVersion {
                logger("Checking VERSION from: ".$checked_url, LOGGER_DEBUG);
 
                // fetch the VERSION file
-               $gitversion = dbesc(trim(fetch_url($checked_url)));
+               $gitversion = DBA::escape(trim(Network::fetchUrl($checked_url)));
                logger("Upstream VERSION is: ".$gitversion, LOGGER_DEBUG);
 
                Config::set('system', 'git_friendica_version', $gitversion);