CRM-13206 fix
authormonishdeb <monish.deb@webaccess.co.in>
Tue, 20 Aug 2013 08:47:47 +0000 (14:17 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Tue, 20 Aug 2013 08:47:47 +0000 (14:17 +0530)
----------------------------------------
* CRM-13206: Use of 'Preferred Language' filter in advance search doesn't fetch proper result
  http://issues.civicrm.org/jira/browse/CRM-13206

CRM/Contact/BAO/Query.php

index fef77865432ed6c946a2fe21c5b376a9632dd290..808a6f3147dc19104b275ce042a1b35c862dd1bd 100644 (file)
@@ -394,7 +394,7 @@ class CRM_Contact_BAO_Query {
   static $_relationshipTempTable = NULL;
 
   public $_pseudoConstantsSelect = array();
-  
+
   /**
    * class constructor which also does all the work
    *
@@ -5018,7 +5018,7 @@ AND   displayRelType.is_active = 1
         $qill = implode(', ', $newValues);
       }
     }
-    else {
+    elseif (!array_key_exists($value, $selectValues)) {
       // its a string, lets get the int value
       $value = array_search($value, $selectValues);
     }