From 9444e963348c024b86d22402c91cfad9b0a41df7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 4 Aug 2006 02:40:26 +0000 Subject: Bug 346588: Versions should be sorted using vers_cmp() - Patch by Olav Vitters r=mkanat a=myk --- Bugzilla/Product.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Product.pm') 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; -- cgit v1.2.3-24-g4f1b