From: Kyle M Hall Date: Tue, 16 Jul 2013 12:32:55 +0000 (-0400) Subject: Bug 10558 [QA Follow-up] X-Git-Tag: v3.16.00-beta~677 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=0713f3bf032b92535e87595e95a44898fb70c72b;p=koha_fer 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 --- 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' %] -