From: Moritz Bunkus Date: Thu, 24 Jan 2013 13:55:56 +0000 (+0100) Subject: Sorted-Controller-Helfer: Standardsortierrichtung nutzen, wenn nicht anders übergeben X-Git-Tag: release-3.1.0beta1~669 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=95eb8f3c833fb46c1094de8955b13e37d05c3156;p=kivitendo-erp.git Sorted-Controller-Helfer: Standardsortierrichtung nutzen, wenn nicht anders übergeben --- 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});