(bug #4487) permit - and . in callnumber plugin
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Wed, 12 May 2010 11:43:32 +0000 (13:43 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 14 May 2010 07:48:00 +0000 (09:48 +0200)
cataloguing/value_builder/callnumber.pl

index ecdaea4..17b6282 100755 (executable)
@@ -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 ) {