fix to remove leading/trailing whitespace from entered barcode.
authorMason James <mason.loves.sushi@gmail.com>
Thu, 19 Mar 2009 22:52:26 +0000 (11:52 +1300)
committerGalen Charlton <galen.charlton@liblime.com>
Mon, 11 May 2009 16:30:51 +0000 (11:30 -0500)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
circ/circulation.pl

index d51f2d3..1c6fb61 100755 (executable)
@@ -112,6 +112,7 @@ if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison t
 }
 
 my $barcode        = $query->param('barcode') || '';
+$barcode =~  s/^[ \t]+|[ \t]+$//g; # remove leading/trailing whitespace
 
 $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
 my $stickyduedate  = $query->param('stickyduedate');