Merge branch '4.5' into 4.6
[civicrm-core.git] / CRM / Dedupe / BAO / QueryBuilder.php
index d372dab0d805d56a1f213310d2e25647f6c26e49..484ce391c64ded690b90940b958f06911a3513da 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * Class CRM_Dedupe_BAO_QueryBuilder
  */
@@ -11,18 +10,16 @@ class CRM_Dedupe_BAO_QueryBuilder {
    *
    * @return string
    */
-  static function internalFilters( $rg, $strID1 = 'contact1.id', $strID2 = 'contact2.id' ) {
+  public static function internalFilters($rg, $strID1 = 'contact1.id', $strID2 = 'contact2.id') {
     // Add a contact id filter for dedupe by group requests and add logic
     // to remove duplicate results with opposing orders, i.e. 1,2 and 2,1
-    if( !empty($rg->contactIds) ) {
-      $cids = implode(',',$rg->contactIds);
+    if (!empty($rg->contactIds)) {
+      $cids = implode(',', $rg->contactIds);
       return "($strID1 IN ($cids) AND ( $strID2 NOT IN ($cids) OR ($strID2 IN ($cids) AND $strID1 < $strID2) ))";
     }
     else {
       return "($strID1 < $strID2)";
     }
   }
-};
-
-
 
+}