diff --git a/api/v1/database/mastodon/accounts/search/mod.php b/api/v1/database/mastodon/accounts/search/mod.php index f33be19..c5a6d7d 100644 --- a/api/v1/database/mastodon/accounts/search/mod.php +++ b/api/v1/database/mastodon/accounts/search/mod.php @@ -171,6 +171,8 @@ if (isset($_GET['profile']) && trim($_GET['profile']) != '') foreach ($all_accounts as $account) { + $ai++; + $acct_for_trusted = $account['username'].'@'.($account['domain'] === null ? $GLOBALS['ap_instance'] : $account['domain']); if (in_array($acct_for_trusted, $trusted_users) || @@ -181,7 +183,6 @@ if (isset($_GET['profile']) && trim($_GET['profile']) != '') if (content_cache__exists($ckey) !== false) continue; - $ai++; $a_note = trim($account['note']); $a_fields = json_decode($account['fields'], true); $fields = ''; @@ -228,8 +229,8 @@ if (isset($_GET['profile']) && trim($_GET['profile']) != '') if ($matches) { $filtered_accounts []= $account['id']; $filtered_accounts_index[$account['id']] = $ai; - if ($user_filter !== 'remote') - continue; + if ($user_filter !== 'remote') continue; + $count_matches++; if ($paging !== null && $count_matches >= $paging[1] && !$enable_caching) $enable_caching = true;