fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-11-02 10:46 am

[dw-free] Sorting icons by keywords should be in case-insensitive order

[commit: http://hg.dwscoalition.org/dw-free/rev/380ab9cde472]

http://bugs.dwscoalition.org/show_bug.cgi?id=4031

Case-insensitive icon keyword orderding.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/Userpic.pm
--------------------------------------------------------------------------------
diff -r 6b93b41242a6 -r 380ab9cde472 cgi-bin/LJ/Userpic.pm
--- a/cgi-bin/LJ/Userpic.pm	Wed Nov 02 17:00:57 2011 +0800
+++ b/cgi-bin/LJ/Userpic.pm	Wed Nov 02 18:47:35 2011 +0800
@@ -1295,7 +1295,7 @@
         } 
     }
         
-    @userpic_array = sort { $a->{keyword} cmp $b->{keyword} } @userpic_array;
+    @userpic_array = sort { lc( $a->{keyword} ) cmp lc( $b->{keyword} ) } @userpic_array;
     push @userpic_array, sort { $a->{keyword} cmp $b->{keyword} } @nokw_array;
 
     return @userpic_array;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org