]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/DiscoverPoCo.php
Merge pull request #5439 from MrPetovan/task/5410-remove-dbesc
[friendica.git] / src / Worker / DiscoverPoCo.php
index 965477d993a46722ae366e6d80500b229210411a..4b3474728ca23f1c790b78cbcb71901a175b9cb7 100644 (file)
@@ -118,7 +118,7 @@ class DiscoverPoCo
        private static function updateServer() {
                $r = q("SELECT `url`, `created`, `last_failure`, `last_contact` FROM `gserver` ORDER BY rand()");
 
-               if (!DBA::is_result($r)) {
+               if (!DBA::isResult($r)) {
                        return;
                }
 
@@ -147,8 +147,8 @@ class DiscoverPoCo
                                WHERE `last_contact` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND
                                        `last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND
                                        `network` IN ('%s', '%s', '%s', '%s', '') ORDER BY rand()",
-                               dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA),
-                               dbesc(NETWORK_OSTATUS), dbesc(NETWORK_FEED));
+                               DBA::escape(NETWORK_DFRN), DBA::escape(NETWORK_DIASPORA),
+                               DBA::escape(NETWORK_OSTATUS), DBA::escape(NETWORK_FEED));
 
                if (!$users) {
                        return;
@@ -224,7 +224,7 @@ class DiscoverPoCo
                        foreach ($j->results as $jj) {
                                // Check if the contact already exists
                                $exists = q("SELECT `id`, `last_contact`, `last_failure`, `updated` FROM `gcontact` WHERE `nurl` = '%s'", normalise_link($jj->url));
-                               if (DBA::is_result($exists)) {
+                               if (DBA::isResult($exists)) {
                                        logger("Profile ".$jj->url." already exists (".$search.")", LOGGER_DEBUG);
 
                                        if (($exists[0]["last_contact"] < $exists[0]["last_failure"]) &&