]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 731163: Search.pm can use undefined alias in ORDER BY clause
authorFrédéric Buclin <LpSolit@gmail.com>
Sat, 10 Mar 2012 14:56:55 +0000 (15:56 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 10 Mar 2012 14:56:55 +0000 (15:56 +0100)
r=dkl a=LpSolit

Bugzilla/Search.pm

index cc74afb4296c8672a4f1281637bb193e5f84c7c4..a0b11dde46048ca114a8e96ee0139bb8a2af7e64 100644 (file)
@@ -799,7 +799,7 @@ sub _extra_columns {
     my ($self) = @_;
     # Everything that's going to be in the ORDER BY must also be
     # in the SELECT.
-    $self->{extra_columns} ||= [ $self->_valid_order_columns ];
+    push(@{ $self->{extra_columns} }, $self->_valid_order_columns);
     return @{ $self->{extra_columns} };
 }