Bugzilla – Attachment 92781 Details for
Bug 15219
Server-side processing and pagination on checkouts tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15219: Fix relatives checkouts
Bug-15219-Fix-relatives-checkouts.patch (text/plain), 2.80 KB, created by
Julian Maurice
on 2019-09-13 12:02:27 UTC
(
hide
)
Description:
Bug 15219: Fix relatives checkouts
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-09-13 12:02:27 UTC
Size:
2.80 KB
patch
obsolete
>From c98124c2a8335e19a3808fe4fbe5622a8080354c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 16 May 2019 11:56:52 +0200 >Subject: [PATCH] Bug 15219: Fix relatives checkouts > >Send all borrowernumbers to /svc/checkouts instead of only the last one >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 5 +---- > svc/checkouts | 16 +++++++++++----- > 2 files changed, 12 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index ca4f10ba39..5aee3b5fb6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -730,10 +730,7 @@ $(document).ready(function() { > "bServerSide": ServerSideCheckoutsTables, > "sAjaxSource": "/cgi-bin/koha/svc/checkouts", > "fnServerParams": function (aoData) { >- for (i in relatives_borrowernumbers) { >- var borrowernumber = relatives_borrowernumbers[i]; >- aoData.push({ "name": "borrowernumber", "value": borrowernumber }); >- } >+ aoData.push({ "name": "borrowernumber", "value": relatives_borrowernumbers }); > }, > "bPaginate": true, > "sPaginationType": "full", >diff --git a/svc/checkouts b/svc/checkouts >index dfc03b78d7..981c7e8b01 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -45,7 +45,13 @@ unless (haspermission($userid, { circulate => 'circulate_remaining_permissions' > exit 0; > } > >-my @borrowernumber = $input->multi_param('borrowernumber'); >+my @borrowernumbers; >+my $borrowernumber = $input->param('borrowernumber'); >+if ($borrowernumber) { >+ push @borrowernumbers, $borrowernumber; >+} else { >+ @borrowernumbers = $input->multi_param('borrowernumber[]'); >+} > my $offset = $input->param('iDisplayStart'); > my $count = $input->param('iDisplayLength'); > >@@ -125,13 +131,13 @@ my $sql = ' > '; > > my $borrowernumber_sql = 'borrowernumber'; >-if ( @borrowernumber == 1 ) { >+if ( @borrowernumbers == 1 ) { > $borrowernumber_sql .= ' = ?'; > } else { >- $borrowernumber_sql .= ' IN (' . join( ',', ('?') x @borrowernumber ) . ') '; >+ $borrowernumber_sql .= ' IN (' . join( ',', ('?') x @borrowernumbers ) . ') '; > } > $sql .= $borrowernumber_sql; >-push( @parameters, @borrowernumber ); >+push( @parameters, @borrowernumbers ); > > $sql .= " $orderby"; > >@@ -257,7 +263,7 @@ print $input->header( -type => 'application/json', -charset => 'UTF-8' ); > my $sEcho = $input->param('sEcho'); > my ($iTotalRecords) = $dbh->selectrow_array( > "SELECT COUNT(*) FROM issues WHERE $borrowernumber_sql", undef, >- @borrowernumber); >+ @borrowernumbers); > > my $response = { > iTotalRecords => $iTotalRecords, >-- >2.20.1
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 15219
:
45018
|
45036
|
45054
|
48107
|
50075
|
60071
|
60642
|
61158
|
61159
|
61545
|
61546
|
72905
|
72906
|
74224
|
74225
|
75911
|
75912
|
75913
|
78555
|
78556
|
78557
|
78558
|
78559
|
79195
|
79196
|
79197
|
79198
|
79199
|
92776
|
92777
|
92778
|
92779
|
92780
| 92781 |
93921