[Koha-patches] [PATCH] fix to remove leading/trailing whitespace from entered barcode.

Mason James mason.loves.sushi at gmail.com
Thu Mar 19 23:52:26 CET 2009


---
 circ/circulation.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/circ/circulation.pl b/circ/circulation.pl
index 631df50..d89c637 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -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');
-- 
1.5.6.5




More information about the Koha-patches mailing list