Merge branch 'bug_10230' into 3.14-master
[koha.git] / tools / batchMod.pl
index 2a87b88..e416d44 100755 (executable)
@@ -34,6 +34,7 @@ use C4::ClassSource;
 use C4::Dates;
 use C4::Debug;
 use MARC::File::XML;
+use List::MoreUtils qw/uniq/;
 
 my $input = new CGI;
 my $dbh = C4::Context->dbh;
@@ -237,7 +238,7 @@ if ($op eq "show"){
             }
         }
         if ( my $list=$input->param('barcodelist')){
-            push my @barcodelist, split(/\s\n/, $list);
+            push my @barcodelist, uniq( split(/\s\n/, $list) );
 
             foreach my $barcode (@barcodelist) {