]> 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 15:05:44 +0000 (16:05 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 10 Mar 2012 15:05:44 +0000 (16:05 +0100)
r=dkl a=LpSolit

Bugzilla/Search.pm

index 736b1af6f356b671719b4bad01887138f9437877..89bb92f19a6957f20737f611e646d8e2a0c731cc 100644 (file)
@@ -809,7 +809,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->_input_order_columns ];
+    push(@{ $self->{extra_columns} }, $self->_input_order_columns);
     return @{ $self->{extra_columns} };
 }