From 0713f3bf032b92535e87595e95a44898fb70c72b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 16 Jul 2013 08:32:55 -0400 Subject: [PATCH] Bug 10558 [QA Follow-up] This patch addresses a number of issues with the main patch: - regression on bug 2060 (i.e., displaying authority import batches correctly) - regression on bug 10170 (translation of import record states)A - use of datatables.inc - lack of clarity as to the licensing of tools/batch_records_ajax.pl - insufficent sanitizing of input used to generate an SQL statement Signed-off-by: Galen Charlton --- C4/ImportBatch.pm | 6 +- .../en/modules/tools/manage-marc-import.tt | 150 +++++++++++------- tools/batch_records_ajax.pl | 19 ++- tools/manage-marc-import.pl | 53 +------ 4 files changed, 111 insertions(+), 117 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index f320c7a0b4..6ddab77fdd 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1032,8 +1032,10 @@ sub GetImportRecordsRange { my $dbh = C4::Context->dbh; - my $order_by = - $dbh->quote_identifier( $parameters->{order_by} || 'import_record_id' ); + my $order_by = $parameters->{order_by} || 'import_record_id'; + ( $order_by ) = grep( /^$order_by$/, qw( import_record_id title status overlay_status ) ) ? $order_by : 'import_record_id'; + $order_by .= ",authorized_heading" if $order_by eq 'title'; + my $order_by_direction = uc( $parameters->{order_by_direction} ) eq 'DESC' ? 'DESC' : 'ASC'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 1a2680343d..40f916d984 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -7,10 +7,8 @@ [% INCLUDE 'doc-head-close.inc' %] - +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] -