function crm_core_activity_search_status in CRM Core 7
Implements hook_search_status().
File
- modules/
crm_core_activity/ crm_core_activity.module, line 532 - Provides an entity for recording a contact's activities.
Code
function crm_core_activity_search_status() {
$total = db_query('SELECT COUNT(*) FROM {crm_core_activity}')
->fetchField();
$remaining = db_query("SELECT COUNT(*) FROM {crm_core_activity} a LEFT JOIN {search_dataset} d ON d.type = 'cmc_activity' AND d.sid = a.activity_id WHERE d.sid IS NULL OR d.reindex <> 0")
->fetchField();
return array(
'remaining' => $remaining,
'total' => $total,
);
}