]> git.mxchange.org Git - friendica.git/blobdiff - mod/noscrape.php
Merge pull request #5753 from MrPetovan/bug/5752-fix-warning-count
[friendica.git] / mod / noscrape.php
index 7af0d9933c4bc26f0faa2535b5e9902880e44f3b..3a8abe2290928e62c40eeb0cda12a389c042af21 100644 (file)
@@ -4,8 +4,10 @@
  */
 
 use Friendica\App;
+use Friendica\Core\Protocol;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
+use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 
 function noscrape_init(App $a)
@@ -30,7 +32,7 @@ function noscrape_init(App $a)
                'guid'     => $a->profile['guid'],
                'key'      => $a->profile['pubkey'],
                'homepage' => System::baseUrl()."/profile/{$which}",
-               'comm'     => ($a->profile['account-type'] == ACCOUNT_TYPE_COMMUNITY),
+               'comm'     => ($a->profile['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY),
        ];
 
        if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
@@ -61,9 +63,9 @@ function noscrape_init(App $a)
                $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 AND `hidden` = 0 AND `archive` = 0
                                AND `network` IN ('%s', '%s', '%s', '')",
                        intval($a->profile['uid']),
-                       dbesc(NETWORK_DFRN),
-                       dbesc(NETWORK_DIASPORA),
-                       dbesc(NETWORK_OSTATUS)
+                       DBA::escape(Protocol::DFRN),
+                       DBA::escape(Protocol::DIASPORA),
+                       DBA::escape(Protocol::OSTATUS)
                );
                if (DBA::isResult($r)) {
                        $json_info["contacts"] = intval($r[0]['total']);