View | Details | Raw Unified | Return to bug 30409
Collapse All | Expand All

(-)a/C4/Circulation.pm (+2 lines)
Lines 153-158 Will do some manipulation of the barcode for systems that deliver a barcode Link Here
153
to circulation.pl that differs from the barcode stored for the item.
153
to circulation.pl that differs from the barcode stored for the item.
154
For proper functioning of this filter, calling the function on the 
154
For proper functioning of this filter, calling the function on the 
155
correct barcode string (items.barcode) should return an unaltered barcode.
155
correct barcode string (items.barcode) should return an unaltered barcode.
156
Barcode is going to be automatically trimmed of leading/trailing whitespaces.
156
157
157
The optional $filter argument is to allow for testing or explicit 
158
The optional $filter argument is to allow for testing or explicit 
158
behavior that ignores the System Pref.  Valid values are the same as the 
159
behavior that ignores the System Pref.  Valid values are the same as the 
Lines 164-169 System Pref options. Link Here
164
# FIXME -- these plugins should be moved out of Circulation.pm
165
# FIXME -- these plugins should be moved out of Circulation.pm
165
#
166
#
166
sub barcodedecode {
167
sub barcodedecode {
168
    $barcode =~ s/^\s+|\s+$//g;
167
    my ($barcode, $filter) = @_;
169
    my ($barcode, $filter) = @_;
168
    my $branch = C4::Context::mybranch();
170
    my $branch = C4::Context::mybranch();
169
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
171
    $filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter;
(-)a/circ/circulation.pl (-1 lines)
Lines 159-165 if (C4::Context->preference("DisplayClearScreenButton")) { Link Here
159
}
159
}
160
160
161
for my $barcode ( @$barcodes ) {
161
for my $barcode ( @$barcodes ) {
162
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
163
    $barcode = barcodedecode( $barcode ) if $barcode;
162
    $barcode = barcodedecode( $barcode ) if $barcode;
164
}
163
}
165
164
(-)a/circ/renew.pl (-1 lines)
Lines 43-49 my $schema = Koha::Database->new()->schema(); Link Here
43
43
44
my $barcode        = $cgi->param('barcode') // '';
44
my $barcode        = $cgi->param('barcode') // '';
45
my $unseen         = $cgi->param('unseen') || 0;
45
my $unseen         = $cgi->param('unseen') || 0;
46
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae
47
$barcode = barcodedecode($barcode) if $barcode;
46
$barcode = barcodedecode($barcode) if $barcode;
48
my $override_limit = $cgi->param('override_limit');
47
my $override_limit = $cgi->param('override_limit');
49
my $override_holds = $cgi->param('override_holds');
48
my $override_holds = $cgi->param('override_holds');
(-)a/circ/returns.pl (-2 lines)
Lines 119-125 foreach ( $query->param ) { Link Here
119
    $counter++;
119
    $counter++;
120
120
121
    # decode barcode    ## Didn't we already decode them before passing them back last time??
121
    # decode barcode    ## Didn't we already decode them before passing them back last time??
122
    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
123
    $barcode = barcodedecode($barcode) if $barcode;
122
    $barcode = barcodedecode($barcode) if $barcode;
124
123
125
    ######################
124
    ######################
126
- 

Return to bug 30409