X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ab7fb099670f2a534540661c6bcc2d6ab92599de..117fefacdfaf457a502b32bae2f0e10fd0e11414:/SL/Controller/CustomVariableConfig.pm diff --git a/SL/Controller/CustomVariableConfig.pm b/SL/Controller/CustomVariableConfig.pm index a2842a0ec..9a151da0e 100644 --- a/SL/Controller/CustomVariableConfig.pm +++ b/SL/Controller/CustomVariableConfig.pm @@ -15,12 +15,7 @@ __PACKAGE__->run_before('check_auth'); sub action_reorder { my ($self) = @_; - my @ids = @{ $::form->{cvarcfg_id} || [] }; - my $result = SL::DB::CustomVariableConfig->new->db->do_transaction(sub { - foreach my $idx (0 .. scalar(@ids) - 1) { - SL::DB::CustomVariableConfig->new(id => $ids[$idx])->load->update_attributes(sortkey => $idx + 1); - } - }); + SL::DB::CustomVariableConfig->reorder_list(@{ $::form->{cvarcfg_id} || [] }); $self->render('1;', { type => 'js', inline => 1 }); }