use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBA;
+use Friendica\Model\Contact;
use Friendica\Model\Profile;
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']) {
$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(NETWORK_DFRN),
+ DBA::escape(NETWORK_DIASPORA),
+ DBA::escape(NETWORK_OSTATUS)
);
if (DBA::isResult($r)) {
$json_info["contacts"] = intval($r[0]['total']);