X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnoscrape.php;h=3a8abe2290928e62c40eeb0cda12a389c042af21;hb=aa2ab3d0e7262fcc9c8c78e4ed943429081af6b0;hp=7af0d9933c4bc26f0faa2535b5e9902880e44f3b;hpb=cfa68c52b9117616fa95a4639ad74e7d220d193d;p=friendica.git diff --git a/mod/noscrape.php b/mod/noscrape.php index 7af0d9933c..3a8abe2290 100644 --- a/mod/noscrape.php +++ b/mod/noscrape.php @@ -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']);