afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-08-01 11:18 am

[dw-free] Filter List Order Not Maintained When Posting and Editing Entries

[commit: http://hg.dwscoalition.org/dw-free/rev/9d98c943d659]

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

Sort according to default sort order

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r 0a18f903e9cb -r 9d98c943d659 cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Sat Aug 01 11:07:26 2009 +0000
+++ b/cgi-bin/weblib.pl	Sat Aug 01 11:17:05 2009 +0000
@@ -1800,7 +1800,7 @@ PREVIEW
                     $out .= LJ::help_icon("security", "<span id='security-help'>\n", "\n</span>\n");
                     $out .= "<div id='custom_boxes' class='pkg' style='display: $display;'>\n";
                     $out .= "<ul id='custom_boxes_list'>";
-                    foreach my $fg ( keys %$trust_groups ) {
+                    foreach my $fg ( sort { $trust_groups->{$a}->{sortorder} <=> $trust_groups->{$b}->{sortorder} } keys %$trust_groups ) {
                         $out .= "<li>";
                         $out .= LJ::html_check({ 'name' => "custom_bit_$fg",
                                                  'id' => "custom_bit_$fg",
--------------------------------------------------------------------------------

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