Records are now again properly sorted by "name" (not "id")
authorshort <>
Mon, 24 Dec 2001 02:52:57 +0000 (02:52 +0000)
committershort <>
Mon, 24 Dec 2001 02:52:57 +0000 (02:52 +0000)
kewensis-collect.pl

index aba360d..ba61527 100755 (executable)
@@ -15,15 +15,6 @@ $debugmatch=0;
 $doimport=1;
 $import_xlate=1;
 
-sub name_to_key
-{
-my( $r )=@_;
-
-       $r=~tr/A-Z/a-z/;
-       $r=~tr/a-z0-9//cd;
-       return $r;
-}
-
 sub rec_to_name
 {
 my( %rec )=@_;
@@ -260,7 +251,7 @@ sub OUT_flush
 if (defined $maxsize) {
        my($fileno)=-1;
        my($filename,$fileid);
-       foreach $owner (sort keys %OWNS) {
+       foreach $owner (sort { $DB{$b}{"name"} cmp $DB{$a}{"name"}; } keys %OWNS) {
        my( $child );
 
                if ($fileno<0 || tell(OUT)>=$maxsize) {
@@ -305,7 +296,7 @@ my($preinsert,$postinsert,%rec)=@_;
 
 my($printrecref)=(defined $maxsize ? \&format_href : \&format_record );
 
-foreach $owner (sort keys %OWNS) {
+foreach $owner (sort { $DB{$b}{"name"} cmp $DB{$a}{"name"}; } keys %OWNS) {
 my( $child );
 
        print OUT "<p>";