Bugzilla – Attachment 97726 Details for
Bug 23354
Add a 'Point of sale' screen to allow anonymous payments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23354: (RM follow-up) Change $q to $input for consistency
Bug-23354-RM-follow-up-Change-q-to-input-for-consi.patch (text/plain), 2.96 KB, created by
Martin Renvoize (ashimema)
on 2020-01-22 13:48:23 UTC
(
hide
)
Description:
Bug 23354: (RM follow-up) Change $q to $input for consistency
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-22 13:48:23 UTC
Size:
2.96 KB
patch
obsolete
>From 71639accafe8323c28231aa3404992994fe9c95a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 22 Jan 2020 12:13:18 +0000 >Subject: [PATCH] Bug 23354: (RM follow-up) Change $q to $input for consistency > >As pointed out by Jonathan, this script introduced a third form for the >CGI variable. This patch updates the script to use the more common >$input variable name. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > pos/pay.pl | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/pos/pay.pl b/pos/pay.pl >index 3d9956f8a5..bb9e556e9c 100755 >--- a/pos/pay.pl >+++ b/pos/pay.pl >@@ -16,14 +16,14 @@ use Koha::Charges::Sales; > use Koha::Database; > use Koha::Libraries; > >-my $q = CGI->new(); >-my $sessionID = $q->cookie('CGISESSID'); >+my $input = CGI->new(); >+my $sessionID = $input->cookie('CGISESSID'); > my $session = get_session($sessionID); > > my ( $template, $loggedinuser, $cookie, $user_flags ) = get_template_and_user( > { > template_name => 'pos/pay.tt', >- query => $q, >+ query => $input, > type => 'intranet', > authnotrequired => 0, > } >@@ -31,7 +31,7 @@ my ( $template, $loggedinuser, $cookie, $user_flags ) = get_template_and_user( > my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in"; > > my $library_id = C4::Context->userenv->{'branch'}; >-my $registerid = $q->param('registerid'); >+my $registerid = $input->param('registerid'); > my $registers = Koha::Cash::Registers->search( > { branch => $library_id, archived => 0 }, > { order_by => { '-asc' => 'name' } } >@@ -60,10 +60,10 @@ my $invoice_types = > {}, $library_id ); > $template->param( invoice_types => $invoice_types ); > >-my $total_paid = $q->param('paid'); >+my $total_paid = $input->param('paid'); > if ( $total_paid and $total_paid ne '0.00' ) { > my $cash_register = Koha::Cash::Registers->find( { id => $registerid } ); >- my $payment_type = $q->param('payment_type'); >+ my $payment_type = $input->param('payment_type'); > my $sale = Koha::Charges::Sales->new( > { > cash_register => $cash_register, >@@ -71,7 +71,7 @@ if ( $total_paid and $total_paid ne '0.00' ) { > } > ); > >- my @sales = $q->multi_param('sales'); >+ my @sales = $input->multi_param('sales'); > for my $item (@sales) { > $item = from_json $item; > $sale->add_item($item); >@@ -81,11 +81,11 @@ if ( $total_paid and $total_paid ne '0.00' ) { > > $template->param( > payment_id => $payment->accountlines_id, >- collected => scalar $q->param('collected'), >- change => scalar $q->param('change') >+ collected => scalar $input->param('collected'), >+ change => scalar $input->param('change') > ); > } > >-output_html_with_http_headers( $q, $cookie, $template->output ); >+output_html_with_http_headers( $input, $cookie, $template->output ); > > 1; >-- >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 23354
:
92066
|
92431
|
92432
|
92433
|
92502
|
92830
|
92831
|
92832
|
92833
|
92834
|
92873
|
92874
|
92875
|
92876
|
92877
|
92878
|
92890
|
92891
|
92892
|
92893
|
92894
|
92895
|
93116
|
93117
|
93118
|
93119
|
93120
|
93121
|
93122
|
93123
|
93124
|
93465
|
93466
|
93467
|
93468
|
93469
|
93470
|
93471
|
93472
|
93473
|
93604
|
93605
|
93606
|
93607
|
93608
|
93609
|
93610
|
93611
|
93612
|
94689
|
94690
|
94691
|
94692
|
94693
|
94694
|
94695
|
94696
|
94697
|
94698
|
94699
|
95678
|
95679
|
95680
|
95681
|
95682
|
95683
|
95684
|
95685
|
95686
|
95687
|
95688
|
95689
|
95690
|
95691
|
95692
|
95693
|
97013
|
97014
|
97015
|
97016
|
97017
|
97018
|
97019
|
97020
|
97021
|
97022
|
97023
|
97024
|
97025
|
97026
|
97027
|
97028
|
97029
|
97169
|
97170
|
97171
|
97188
|
97189
|
97200
|
97201
|
97202
|
97203
|
97204
|
97205
|
97206
|
97207
|
97208
|
97209
|
97210
|
97211
|
97212
|
97213
|
97214
|
97215
|
97216
|
97217
|
97218
|
97219
|
97271
|
97272
|
97273
|
97274
|
97275
|
97276
|
97277
|
97278
|
97279
|
97280
|
97281
|
97282
|
97283
|
97284
|
97285
|
97286
|
97287
|
97288
|
97289
|
97290
|
97291
|
97292
|
97725
| 97726 |
100167