CRM-13812 - fixed the broken query for activity search

CRM-13812 - fixed the broken query for activity search