Bugzilla – Attachment 70447 Details for
Bug 19937
Silence warnings t/db_dependent/www/batch.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19937: Silence warnings t/db_dependent/www/batch.t
Bug-19937-Silence-warnings-tdbdependentwwwbatcht.patch (text/plain), 2.87 KB, created by
Marcel de Rooy
on 2018-01-12 08:41:42 UTC
(
hide
)
Description:
Bug 19937: Silence warnings t/db_dependent/www/batch.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-01-12 08:41:42 UTC
Size:
2.87 KB
patch
obsolete
>From cb2ec3a782f92417f5ac469f6699daa1168a44b9 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 9 Jan 2018 14:37:08 +0000 >Subject: [PATCH] Bug 19937: Silence warnings t/db_dependent/www/batch.t >Content-Type: text/plain; charset=utf-8 > >TEST PLAN >--------- >1) Run the following on a kohadevbox: > git checkout -b bug_19937 origin/master > sudo koha-shell -c bash kohadev > prove t/db_dependent/www/batch.t > cat /var/log/koha/kohadev/plack-error.log > > The following errors are triggered at the end of the log file: > Use of uninitialized value in array element at > /home/vagrant/kohaclone/tools/batch_records_ajax.pl line 50. > Use of uninitialized value $results_per_page in numeric eq (==) at > /home/vagrant/kohaclone/tools/batch_records_ajax.pl line 53. > Use of uninitialized value in uc at > /home/vagrant/kohaclone/C4/ImportBatch.pm line 1120. > >2) Run the following on a kohadevbox: > exit > git bz apply 19937 > restart_all > sudo koha-shell -c bash kohadev > prove t/db_dependent/www/batch.t > cat /var/log/koha/kohadev/plack-error.log > > The log file will end with the restarting of plack, not the > errors. > >3) run koha qa test tools > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Amended handling of $results_per_page. >--- > C4/ImportBatch.pm | 2 +- > tools/batch_records_ajax.pl | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 9b066c7..1b74929 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -1118,7 +1118,7 @@ sub GetImportRecordsRange { > ( $order_by ) = grep( /^$order_by$/, qw( import_record_id title status overlay_status ) ) ? $order_by : 'import_record_id'; > > my $order_by_direction = >- uc( $parameters->{order_by_direction} ) eq 'DESC' ? 'DESC' : 'ASC'; >+ uc( $parameters->{order_by_direction} // 'ASC' ) eq 'DESC' ? 'DESC' : 'ASC'; > > $order_by .= " $order_by_direction, authorized_heading" if $order_by eq 'title'; > >diff --git a/tools/batch_records_ajax.pl b/tools/batch_records_ajax.pl >index c8c6198..349d858 100755 >--- a/tools/batch_records_ajax.pl >+++ b/tools/batch_records_ajax.pl >@@ -47,10 +47,10 @@ my @sort_columns = > my $import_batch_id = $input->param('import_batch_id'); > my $offset = $input->param('iDisplayStart'); > my $results_per_page = $input->param('iDisplayLength'); >-my $sorting_column = $sort_columns[ $input->param('iSortCol_0') ]; >+my $sorting_column = $sort_columns[ $input->param('iSortCol_0') // 0 ]; > my $sorting_direction = $input->param('sSortDir_0'); > >-$results_per_page = undef if ( $results_per_page == -1 ); >+$results_per_page = undef if $results_per_page && $results_per_page == -1; > > binmode STDOUT, ":encoding(UTF-8)"; > print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19937
:
70364
|
70410
| 70447