From 419b6f007adc5721dd42407eb6094a7150323318 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 21 Feb 2007 15:58:41 +0000 Subject: [PATCH] Erweiterte Liste von erlaubten Spaltennamen, nach denen sortiert werden darf. --- SL/AR.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/AR.pm b/SL/AR.pm index 45c445396..f828270df 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -605,7 +605,12 @@ sub ar_transactions { my @a = (transdate, invnumber, name); push @a, "employee" if $form->{l_employee}; my $sortorder = join(', ', @a); - $sortorder = $form->{sort} if ($form->{sort} && grep({ $_ eq $form->{sort} } @a)); + + if (grep({ $_ eq $form->{sort} } + qw(id transdate duedate invnumber ordnumber name + datepaid employee shippingpoint shipvia))) { + $sortorder = $form->{sort}; + } $query .= " WHERE $where ORDER by $sortorder"; -- 2.20.1