Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-04-22-25-32
authorkurund <kurund@civicrm.org>
Mon, 4 Aug 2014 17:01:05 +0000 (22:31 +0530)
committerkurund <kurund@civicrm.org>
Mon, 4 Aug 2014 17:01:05 +0000 (22:31 +0530)
Conflicts:
CRM/Utils/Type.php

1  2 
CRM/Contact/BAO/Query.php
CRM/Core/BAO/CustomValueTable.php
CRM/Utils/Type.php

Simple merge
Simple merge
index 5192000e2e67e0b9abc2d3f29dbb8a0483e56ceb,db7896862394338827aa62e11420737062ef1d83..ece56c100a291710c1794456c0e98e0bf0212095
@@@ -158,33 -160,15 +158,38 @@@ class CRM_Utils_Type 
          break;
  
        case 'Positive':
-         // the below 2 are for custom fields of this type
-         // CRM-8925
+       // CRM-8925 the 3 below are for custom fields of this type
        case 'Country':
        case 'StateProvince':
 +        // Checked for multi valued state/country value
 +        if (is_array($data)) {
 +          $returnData = TRUE;
 +          foreach ($data as $data) {
 +            if (CRM_Utils_Rule::positiveInteger($data) || CRM_Core_DAO::escapeString($data)) {
 +              $returnData = TRUE;
 +            }
 +            else {
 +              $returnData = FALSE;
 +            }
 +          }
 +          if ($returnData) {
 +            return $data;
 +          }
 +        }
 +        elseif (!is_numeric($data) &&  CRM_Core_DAO::escapeString($data)) {
 +          return $data;
 +        }
 +        elseif (CRM_Utils_Rule::positiveInteger($data)) {
 +          return $data;
 +        }
 +        break;
 +
+       case 'File':
+         if (CRM_Utils_Rule::positiveInteger($data)) {
+           return $data;
+         }
+         break;
        case 'Link':
          if (CRM_Utils_Rule::url($data = trim($data))) {
            return $data;