Added the current uncommited changes to production code, and rebased to 4.6.8
[civicrm-core.git] / CRM / Contact / BAO / Contact / Utils.php
index 2b3f0879133a708bb6380fb22cc9f9d70deb0031..1a468fda15b8f06670ad475c7cb972a5789b9790 100644 (file)
@@ -997,7 +997,7 @@ INNER JOIN civicrm_contact contact_target ON ( contact_target.id = act.contact_i
           FROM civicrm_contact
           WHERE contact_type = %1
           AND ({$idFldName} IS NULL
-          OR ( {$idFldName} IS NOT NULL AND ({$displayFldName} IS NULL OR {$displayFldName} = '')) )";
+          OR ( {$idFldName} IS NOT NULL AND ({$displayFldName} IS NULL OR {$displayFldName} = '')) ) LIMIT 800";
       }
 
       if ($limit) {