From 1ade8550a1972d30d9bbc654bdec8b7c3da6ed2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 26 Feb 2013 14:03:01 +0100 Subject: [PATCH] =?utf8?q?Kundenbericht/Lieferantenbericht:=20Wieder=20ric?= =?utf8?q?htig=20Sortieren=20k=C3=B6nnen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Ist im commit e5e2493f45a28623c056023159f4166c2dac63a0 kaputt gegangen. --- SL/CT.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/CT.pm b/SL/CT.pm index dd9d627b8..f820acfcf 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -635,16 +635,16 @@ sub search { "salesman" => "e.name" ); + $form->{sort} ||= "name"; my $sortorder; if ( $join_records ) { # in UNION case order by hash key, e.g. salesman # the UNION created an implicit select around the result - $sortorder = $form->{sort} && $allowed_sort_columns{$form->{sort}} ? $form->{sort} : "name"; + $sortorder = $allowed_sort_columns{$form->{sort}} ? $form->{sort} : "name"; } else { # in not UNION case order by hash value, e.g. e.name - $sortorder = $form->{sort} && $allowed_sort_columns{$form->{sort}} ? $allowed_sort_columns{$form->{sort}} : "ct.name"; + $sortorder = $allowed_sort_columns{$form->{sort}} ? $allowed_sort_columns{$form->{sort}} : "ct.name"; }; - $form->{sort} = $sortorder; my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; if ($sortorder !~ /(business|id)/ && !$join_records) { -- 2.20.1