]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 152138 - 2.14.2 breaks sorting on more than one field
authorbbaetz%student.usyd.edu.au <>
Sat, 29 Jun 2002 08:59:21 +0000 (08:59 +0000)
committerbbaetz%student.usyd.edu.au <>
Sat, 29 Jun 2002 08:59:21 +0000 (08:59 +0000)
r=timeless, preed

buglist.cgi

index d6e98fdd1cfb0e5beefd9370aa0f3b37332e0c9e..4e34ae51153143f3dcf2c4244e738383408e7e48 100755 (executable)
@@ -1072,7 +1072,7 @@ if (defined $::FORM{'order'} && $::FORM{'order'} ne "") {
             # A custom list of columns.  Make sure each column is valid.
             foreach my $fragment (split(/,/, $::FORM{'order'})) {
                 my $ident_iregexp = "[a-z_][0-9a-z_]*";
-                if (trim($fragment) !~ /^${ident_iregexp}\.${ident_iregexp}(\s+(asc|desc))?$/i) {
+                if ($fragment !~ /^\s*${ident_iregexp}\.${ident_iregexp}(\s+(asc|desc))?\s*$/i) {
                     my $qfragment = html_quote($fragment);
                     my $error = "The custom sort order you specified in your "
                               . "form submission contains an invalid column "
@@ -1095,7 +1095,7 @@ if (defined $::FORM{'order'} && $::FORM{'order'} ne "") {
             last ORDER;
         };
         /Assign/ && do {
-            $::FORM{'order'} = "map_assigned_to.login_name, bugs.bug_status, priority, bugs.bug_id";
+            $::FORM{'order'} = "map_assigned_to.login_name, bugs.bug_status, bugs.priority, bugs.bug_id";
             last ORDER;
         };
         # DEFAULT