From 95eb8f3c833fb46c1094de8955b13e37d05c3156 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 24 Jan 2013 14:55:56 +0100 Subject: [PATCH] =?utf8?q?Sorted-Controller-Helfer:=20Standardsortierricht?= =?utf8?q?ung=20nutzen,=20wenn=20nicht=20anders=20=C3=BCbergeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Helper/Sorted.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Helper/Sorted.pm b/SL/Controller/Helper/Sorted.pm index 98c0a7c10..2bdc51b6b 100644 --- a/SL/Controller/Helper/Sorted.pm +++ b/SL/Controller/Helper/Sorted.pm @@ -108,9 +108,10 @@ sub _save_current_sort_params { my ($self) = @_; my $sort_spec = $self->get_sort_spec; + my $dir_idx = $sort_spec->{FORM_PARAMS}->[1]; $self->{PRIV()} = { by => $::form->{ $sort_spec->{FORM_PARAMS}->[0] }, - dir => !!$::form->{ $sort_spec->{FORM_PARAMS}->[1] } * 1, + dir => defined($::form->{$dir_idx}) ? $::form->{$dir_idx} * 1 : undef, }; # $::lxdebug->message(0, "saving current sort params to " . $self->{PRIV()}->{by} . ' / ' . $self->{PRIV()}->{dir}); -- 2.20.1