diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index d445f8f2f..7bcab08cc 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -198,9 +198,15 @@ sub getAdminFunction { if ($id) { return $self->_formatFunction($functions->{$id}); } else { - my @list; + my %names; foreach my $id (keys %{$functions}) { - push(@list,$self->_formatFunction($functions->{$id})); + my $func = $self->_formatFunction($functions->{$id}); + $names{$func->{title}} = $func; + } + my @sorted = sort {$a cmp $b} keys %names; + my @list; + foreach my $key (@sorted) { + push(@list,$names{$key}); } return \@list; } diff --git a/lib/WebGUI/Utility.pm b/lib/WebGUI/Utility.pm index ff7c59c27..7cdc015c0 100644 --- a/lib/WebGUI/Utility.pm +++ b/lib/WebGUI/Utility.pm @@ -45,8 +45,8 @@ This package provides miscellaneous but useful utilities to the WebGUI programme $integer = randint($low,$high); randomizeArray(\@array); $hashRef = randomizeHash(\%hash); - $hash = sortHash(%hash); - $hash = sortHashDescending(%hash); + %hash = sortHash(%hash); + %hash = sortHashDescending(%hash); =head1 METHODS