alpha sort CDR formats, weight has lost all usefulness
authorIvan Kohler <ivan@freeside.biz>
Sat, 3 Feb 2018 20:57:43 +0000 (12:57 -0800)
committerIvan Kohler <ivan@freeside.biz>
Sat, 3 Feb 2018 20:57:43 +0000 (12:57 -0800)
FS/FS/cdr.pm

index 331ac0f..844b7fd 100644 (file)
@@ -1659,7 +1659,12 @@ foreach my $INC ( @INC ) {
 
 tie my %import_formats, 'Tie::IxHash',
   map  { $_ => $cdr_info{$_}->{'name'} }
-  sort { $cdr_info{$a}->{'weight'} <=> $cdr_info{$b}->{'weight'} }
+  
+  #this is not doing anything useful anymore
+  #sort { $cdr_info{$a}->{'weight'} <=> $cdr_info{$b}->{'weight'} }
+  #so just sort alpha
+  sort { lc($cdr_info{$a}->{'name'}) cmp lc($cdr_info{$b}->{'name'}) }
+
   grep { exists($cdr_info{$_}->{'import_fields'}) }
   keys %cdr_info;