Merge pull request #2242 from eileenmcnaughton/CRM-13707
[civicrm-core.git] / CRM / Core / BAO / Mapping.php
index cd28f41a1db8fd8538baefc17cbb637cba8c36e5..a74e2ed0c96e4a9abf4637017ffed65aa63ff37c 100644 (file)
@@ -328,7 +328,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
 
       // exclude the address options disabled in the Address Settings
       $fields[$value] = CRM_Core_BAO_Address::validateAddressOptions($contactFields);
-
+      ksort($fields[$value]);
       if ($mappingType == 'Export') {
         $relationships = array();
         $relationshipTypes = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $value);
@@ -560,7 +560,6 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
 
     foreach ($sel1 as $key => $sel) {
       if ($key) {
-        asort($mapperFields[$key]);
         $sel2[$key] = array('' => ts('- select field -')) + $mapperFields[$key];
       }
     }
@@ -849,20 +848,20 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
         if ($mappingType == 'Search Builder') {
           //CRM -2292, restricted array set
           $operatorArray = array(
-            ''             => ts('-operator-'),
-            '='            => '=',
-            '!='           => '!=',
-            '>'            => '>',
-            '<'            => '<',
-            '>='           => '>=',
-            '<='           => '<=',
-            'IN'           => 'IN',
-            'LIKE'         => 'LIKE',
-            'RLIKE'        => 'RLIKE',
-            'IS EMPTY'     => 'IS EMPTY',
-            'IS NOT EMPTY' => 'IS NOT EMPTY',
-            'IS NULL'      => 'IS NULL',
-            'IS NOT NULL'  => 'IS NOT NULL',
+            '' => ts('-operator-'),
+            '=' => '=',
+            '!=' => '≠',
+            '>' => '>',
+            '<' => '<',
+            '>=' => '≥',
+            '<=' => '≤',
+            'IN' => ts('In'),
+            'LIKE' => ts('Like'),
+            'RLIKE' => ts('Regex'),
+            'IS EMPTY' => ts('Is Empty'),
+            'IS NOT EMPTY' => ts('Not Empty'),
+            'IS NULL' => ts('Is Null'),
+            'IS NOT NULL' => ts('Not Null'),
           );
 
           $form->add('select', "operator[$x][$i]", '', $operatorArray);