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

(-)a/virtualshelves/shelves.pl (-2 / +3 lines)
Lines 21-26 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Biblio qw( GetMarcBiblio );
23
use C4::Biblio qw( GetMarcBiblio );
24
use C4::Circulation qw( barcodedecode );
24
use C4::Koha qw(
25
use C4::Koha qw(
25
    GetNormalizedEAN
26
    GetNormalizedEAN
26
    GetNormalizedISBN
27
    GetNormalizedISBN
Lines 154-160 if ( $op eq 'add_form' ) { Link Here
154
            if ( $shelf->can_biblios_be_added( $loggedinuser ) ) {
155
            if ( $shelf->can_biblios_be_added( $loggedinuser ) ) {
155
                my @barcodes = split /\n/, $barcodes; # Entries are effectively passed in as a <cr> separated list
156
                my @barcodes = split /\n/, $barcodes; # Entries are effectively passed in as a <cr> separated list
156
                foreach my $barcode (@barcodes){
157
                foreach my $barcode (@barcodes){
157
                    $barcode =~ s/\r$//; # strip any naughty return chars
158
                    $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
159
                    $barcode = barcodedecode( $barcode ) if $barcode;
158
                    next if $barcode eq '';
160
                    next if $barcode eq '';
159
                    my $item = Koha::Items->find({barcode => $barcode});
161
                    my $item = Koha::Items->find({barcode => $barcode});
160
                    if ( $item ) {
162
                    if ( $item ) {
161
- 

Return to bug 29114