From 0e940be7d3be8a8d3494ed274d2fdb6bd110d5e4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 5 Feb 2020 13:00:38 +0100 Subject: [PATCH] Bug 24156: Fix set sort order to the first column In that case it's equal to 0 and we need to adjust the test condition. Signed-off-by: Liz Rea Signed-off-by: Liz Rea --- admin/columns_settings.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index afa33c7dbd..51d1d56d75 100755 --- a/admin/columns_settings.pl +++ b/admin/columns_settings.pl @@ -53,7 +53,8 @@ if ( $action eq 'save' ) { next unless $table_id =~ m|^([^#]*)#(.*)$|; my $default_display_length = $input->param( $table_id . '_default_display_length' ); my $default_sort_order = $input->param( $table_id . '_default_sort_order' ); - if ( $default_display_length && $default_sort_order ) { + if ( defined $default_display_length && $default_display_length ne "" + && defined $default_sort_order && $default_sort_order ne "" ) { C4::Utils::DataTables::TablesSettings::update_table_settings( { module => $module, -- 2.20.1