Skip to content

Commit

Permalink
Item12180: Sort keys in debug message as this debugger expects...
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@15861 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
TimotheLitt authored and TimotheLitt committed Nov 3, 2012
1 parent bf77255 commit 58a7048
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion core/lib/Foswiki/Configure/Feedback.pm
Expand Up @@ -200,6 +200,18 @@ sub deliver {
$pending++;
}
}
my @pendingItems = map { { item => $_->[0] } } sort {
my @a = @{ $a->[1] };
my @b = @{ $b->[1] };
while ( @a && @b ) {
my $c = shift(@a) cmp shift(@b);
return $c if ($c);
}
return @a <=> @b;
} map {
[ $_, [ map { s/(?:^\{)|(?:\}$)//g; $_ } split( /\}\{/, $_ ) ] ]
} keys %updated
if (DISPLAY_UNSAVED);

my $pendingHtml =
Foswiki::Configure::UI::getTemplateParser()
Expand All @@ -209,7 +221,7 @@ sub deliver {
{
pendingCount => $pending,
listPending => DISPLAY_UNSAVED,
pendingItems => [ map { { item => $_ } } sort keys \%updated ],
pendingItems => \@pendingItems,
}
);
Foswiki::Configure::UI::getTemplateParser()
Expand Down

0 comments on commit 58a7048

Please sign in to comment.