(bug #4487) permit - and . in callnumber plugin

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Nahuel ANGELINETTI 2010-05-12 13:44:32 +02:00 committed by Chris Cormack
parent 52b00b7589
commit e3387b9c4f

View file

@ -95,7 +95,8 @@ sub plugin {
);
}
# If a prefix is submited, we look for the highest itemcallnumber with this prefix, and return it incremented
} elsif ( $code =~ m/^[A-Z]+$/ ) {
} elsif ( $code =~ m/^[A-Z.\-]+$/ ) {
warn $code;
my $sth = $dbh->prepare("SELECT MAX(CAST(SUBSTRING_INDEX(itemcallnumber,' ',-1) AS SIGNED)) FROM items WHERE itemcallnumber LIKE ?");
$sth->execute($code.' %');
if ( my $max = $sth->fetchrow ) {