Skip to content

Commit

Permalink
fix jenkin test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrapurohit committed Jun 22, 2016
1 parent 57f8e7f commit 11f8e19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ public static function fixWhereValues($id, &$values, $wildcard = 0, $useEquals =
* @param array $values
* @param string $apiEntity
*/
public function whereClauseSingle(&$values, $apiEntity) {
public function whereClauseSingle(&$values, $apiEntity = NULL) {
// do not process custom fields or prefixed contact ids or component params
if (CRM_Core_BAO_CustomField::getKeyID($values[0]) ||
(substr($values[0], 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) ||
Expand Down Expand Up @@ -1977,7 +1977,7 @@ public function whereClauseSingle(&$values, $apiEntity) {
*
* @return string
*/
public function whereClause($apiEntity) {
public function whereClause($apiEntity = NULL) {
$this->_where[0] = array();
$this->_qill[0] = array();

Expand Down Expand Up @@ -3382,6 +3382,7 @@ public function greetings(&$values) {
*/
protected function email(&$values, $apiEntity) {
list($name, $op, $value, $grouping, $wildcard) = $values;
$this->_tables['civicrm_email'] = $this->_whereTables['civicrm_email'] = 1;

// CRM-18147: for Contact's GET API, email fieldname got appended with its entity as in {$apiEntiy}_{$name}
// so following code is use build whereClause for contact's primart email id
Expand Down Expand Up @@ -3416,8 +3417,6 @@ protected function email(&$values, $apiEntity) {
$this->_qill[$grouping][] = ts('Email') . " $op ";
$this->_where[$grouping][] = self::buildClause('civicrm_email.email', $op, NULL, 'String');
}

$this->_tables['civicrm_email'] = $this->_whereTables['civicrm_email'] = 1;
}

/**
Expand Down

0 comments on commit 11f8e19

Please sign in to comment.