fixed activity query (CRM-13092)
Merge pull request #1339 from yashodha/CRM-13092

fixed activity query (CRM-13092)