diff options
-rw-r--r-- | Bugzilla/Product.pm | 7 | ||||
-rwxr-xr-x | query.cgi | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index b025cd7cb..6f65eae29 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -25,6 +25,8 @@ use Bugzilla::Util; use Bugzilla::Group; use Bugzilla::Error; +use Bugzilla::Install::Requirements; + use base qw(Bugzilla::Object); use constant DEFAULT_CLASSIFICATION_ID => 1; @@ -107,11 +109,10 @@ sub versions { if (!defined $self->{versions}) { my $values = $dbh->selectcol_arrayref(q{ SELECT value FROM versions - WHERE product_id = ? - ORDER BY value}, undef, $self->id); + WHERE product_id = ?}, undef, $self->id); my @versions; - foreach my $value (@$values) { + foreach my $value (sort { vers_cmp (lc($a), lc($b)) } @$values) { push @versions, new Bugzilla::Version($self->id, $value); } $self->{versions} = \@versions; @@ -38,6 +38,7 @@ use Bugzilla::Error; use Bugzilla::Product; use Bugzilla::Keyword; use Bugzilla::Field; +use Bugzilla::Install::Requirements; my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; @@ -211,7 +212,7 @@ foreach my $product (@selectable_products) { } my @components = sort(keys %components); -my @versions = sort(keys %versions); +my @versions = sort { vers_cmp (lc($a), lc($b)) } keys %versions; my @milestones = sort(keys %milestones); $vars->{'product'} = \@selectable_products; |