CRM-13278 - Select fields for export "- related contact info -" fields are not sorted...
authorDonald A. Lobo <lobo@civicrm.org>
Wed, 15 Jan 2014 22:23:59 +0000 (14:23 -0800)
committerDonald A. Lobo <lobo@civicrm.org>
Wed, 15 Jan 2014 22:23:59 +0000 (14:23 -0800)
http://issues.civicrm.org/jira/browse/CRM-13278

CRM/Core/BAO/Mapping.php

index a74e2ed0c96e4a9abf4637017ffed65aa63ff37c..4eca12bb0d11cc2f188753f9044f487549d145e9 100644 (file)
@@ -560,6 +560,11 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
 
     foreach ($sel1 as $key => $sel) {
       if ($key) {
+        // sort everything BUT the contactType which is sorted seperately by
+        // an initial commit of CRM-13278 (check ksort above)
+        if (!in_array($key, $contactType)) {
+          asort($mapperFields[$key]);
+        }
         $sel2[$key] = array('' => ts('- select field -')) + $mapperFields[$key];
       }
     }