test build failure fix
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 31 Jul 2015 12:28:50 +0000 (17:58 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Sat, 22 Aug 2015 18:00:14 +0000 (23:30 +0530)
CRM/Contact/BAO/Query.php
CRM/Contact/Form/Search/Basic.php
CRM/Contribute/BAO/Contribution.php
api/v3/Contact.php
api/v3/utils.php

index 5fbb6f6e688da1edf6df2668a90358e34e4ecc35..5b9fbc2e9e46061cf227f76e036765d31a13367f 100644 (file)
@@ -1335,7 +1335,7 @@ class CRM_Contact_BAO_Query {
         // make sure there is only one element
         // this is used when we are running under smog and need to know
         // how the contact was added (CRM-1203)
-        $groups = CRM_Utils_Array::value($this->_paramLookup['group'][0][1], $this->_paramLookup['group'][0][2], $this->_paramLookup['group'][0][2]);
+        $groups = (array) CRM_Utils_Array::value($this->_paramLookup['group'][0][1], $this->_paramLookup['group'][0][2], $this->_paramLookup['group'][0][2]);
         if ((count($this->_paramLookup['group']) == 1) &&
           (count($groups) == 1)
         ) {
@@ -1841,26 +1841,7 @@ class CRM_Contact_BAO_Query {
         }
         // check for both id and contact_id
         if ($this->_params[$id][0] == 'id' || $this->_params[$id][0] == 'contact_id') {
-          if (
-            $this->_params[$id][1] == 'IS NULL' ||
-            $this->_params[$id][1] == 'IS NOT NULL'
-          ) {
-            $this->_where[0][] = "contact_a.id {$this->_params[$id][1]}";
-          }
-          elseif (is_array($this->_params[$id][2])) {
-            $idList = implode("','", $this->_params[$id][2]);
-            //why on earth do they put ' in the middle & not on the outside? We have to assume it's
-            //to support 'something' so lets add them conditionally to support the api (which is a tested flow
-            // so if you are looking to alter this check api test results
-            if (strpos(trim($idList), "'") > 0) {
-              $idList = "'" . $idList . "'";
-            }
-
-            $this->_where[0][] = "contact_a.id IN ({$idList})";
-          }
-          else {
-            $this->_where[0][] = self::buildClause("contact_a.id", "{$this->_params[$id][1]}", "{$this->_params[$id][2]}");
-          }
+          $this->_where[0][] = self::buildClause("contact_a.id", $this->_params[$id][1], $this->_params[$id][2]);
         }
         else {
           $this->whereClauseSingle($this->_params[$id]);
index 9387d6b08bb985dee78fe1f55a75894612078635..86148ec493b4f83aed78c481ca43440d9b347d22 100644 (file)
@@ -182,7 +182,7 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
     }
 
     if (isset($this->_groupID) && empty($this->_formValues['group'])) {
-      $this->_formValues['group'][$this->_groupID] = 1;
+      $this->_formValues['group'] = $this->_groupID;
     }
     elseif (isset($this->_ssID) && empty($_POST)) {
       // if we are editing / running a saved search and the form has not been posted
@@ -229,20 +229,6 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
       $this->_formValues['contact_type'][$contactType] = 1;
     }
 
-    $config = CRM_Core_Config::singleton();
-
-    $group = CRM_Utils_Array::value('group', $this->_formValues);
-    if ($group && !is_array($group)) {
-      unset($this->_formValues['group']);
-      $this->_formValues['group'][$group] = 1;
-    }
-
-    $tag = CRM_Utils_Array::value('tag', $this->_formValues);
-    if ($tag && !is_array($tag)) {
-      unset($this->_formValues['tag']);
-      $this->_formValues['tag'][$tag] = 1;
-    }
-
     return NULL;
   }
 
index 79f7f12b569f7e9e891342daae0a79e02cd20010..ffb02e8458bd00c19d4fc64278e14754ca7775ad 100644 (file)
@@ -2147,7 +2147,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         'payment_processor'
       );
       if ($paymentProcessorID) {
-        //$intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage;
+        $intentionalEnotice = $CRM16923AnUnreliableMethodHasBeenUserToDeterminePaymentProcessorFromContributionPage;
       }
     }
 
index 6eea28270ef3a872f989c5e71e450cb0c31c9604..4ae0ed576ae6294a5535c4ca0cde3f53a1eac8b2 100644 (file)
@@ -337,8 +337,6 @@ function _civicrm_api3_contact_get_supportanomalies(&$params, &$options) {
       $groups = explode(',', $params['filter.group_id']);
     }
     unset($params['filter.group_id']);
-    $groups = array_flip($groups);
-    $groups[key($groups)] = 1;
     $options['input_params']['group'] = $groups;
   }
 }
index 479afac1b60bbe0f7b58e608d8ad5506d59408fd..d2b8495f83030c74122eeae65e66674e337a7856 100644 (file)
@@ -900,17 +900,6 @@ function _civicrm_api3_get_using_query_object($entity, $params, $additional_opti
   }
 
   $newParams = CRM_Contact_BAO_Query::convertFormValues($inputParams);
-  foreach ($newParams as &$newParam) {
-    if ($newParam[1] == '='  && is_array($newParam[2])) {
-      // we may be looking at an attempt to use the 'IN' style syntax
-      // @todo at time of writing only 'IN' & 'NOT IN' are  supported for the array style syntax
-      $sqlFilter = CRM_Core_DAO::createSqlFilter($newParam[0], $params[$newParam[0]], 'String', NULL, TRUE);
-      if ($sqlFilter) {
-        $newParam[1] = key($newParam[2]);
-        $newParam[2] = $sqlFilter;
-      }
-    }
-  }
 
   $skipPermissions = !empty($params['check_permissions']) ? 0 : 1;