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

(-)a/C4/Circulation.pm (-5 / +4 lines)
Lines 182-188 sub barcodedecode { Link Here
182
	} elsif ($filter eq 'cuecat') {
182
	} elsif ($filter eq 'cuecat') {
183
		chomp($barcode);
183
		chomp($barcode);
184
	    my @fields = split( /\./, $barcode );
184
	    my @fields = split( /\./, $barcode );
185
	    my @results = map( decode($_), @fields[ 1 .. $#fields ] );
185
	    my @results = map( C4::Circulation::_decode($_), @fields[ 1 .. $#fields ] );
186
	    ($#results == 2) and return $results[2];
186
	    ($#results == 2) and return $results[2];
187
	} elsif ($filter eq 'T-prefix') {
187
	} elsif ($filter eq 'T-prefix') {
188
		if ($barcode =~ /^[Tt](\d)/) {
188
		if ($barcode =~ /^[Tt](\d)/) {
Lines 213-221 sub barcodedecode { Link Here
213
    return $barcode;    # return barcode, modified or not
213
    return $barcode;    # return barcode, modified or not
214
}
214
}
215
215
216
=head2 decode
216
=head2 _decode
217
217
218
  $str = &decode($chunk);
218
  $str = &_decode($chunk);
219
219
220
Decodes a segment of a string emitted by a CueCat barcode scanner and
220
Decodes a segment of a string emitted by a CueCat barcode scanner and
221
returns it.
221
returns it.
Lines 225-231 or Javascript based decoding on the client side. Link Here
225
225
226
=cut
226
=cut
227
227
228
sub decode {
228
sub _decode {
229
    my ($encoded) = @_;
229
    my ($encoded) = @_;
230
    my $seq =
230
    my $seq =
231
      'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-';
231
      'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-';
232
- 

Return to bug 27673