summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Product.pm7
-rwxr-xr-xquery.cgi3
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;
diff --git a/query.cgi b/query.cgi
index 57f965377..7b737d03f 100755
--- a/query.cgi
+++ b/query.cgi
@@ -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;