(bug #4491) fix weird code in search scripts
[koha.git] / C4 / Labels.pm
index 9992526..82c59cc 100644 (file)
@@ -980,7 +980,7 @@ sub split_ddcn {
     # ddcn examples: 'R220.3 H2793Z H32 c.2', 'BIO JP2 R5c.1'
 
     my (@parts) = m/
-        ^([a-zA-Z-]+(?:$possible_decimal)?) # R220.3            # BIO   # first example will require extra splitting
+        ^([a-zA-Z-]+[0-9]?-?[a-zA-Z]*(?:$possible_decimal)?) # R220.3            # BIO   # first example will require extra splitting
         \s*
         (.+)                               # H2793Z H32 c.2   # R5c.1   # everything else (except bracketing spaces)
         \s*
@@ -1202,6 +1202,7 @@ sub DrawBarcode {
                 ySize         => ( .02 * $height ),
                 xSize         => $xsize_ratio,
                 hide_asterisk => 1,
+                mode          => 'graphic',  # the only other option here is Type3...
             );
         };
         if ($@) {
@@ -1227,6 +1228,7 @@ sub DrawBarcode {
                 ySize         => ( .02 * $height ),
                 xSize         => $xsize_ratio,
                 hide_asterisk => 1,
+                mode          => 'graphic',  # the only other option here is Type3...
             );
         };
 
@@ -1252,7 +1254,8 @@ sub DrawBarcode {
                 ySize         => ( .02 * $height ),
                 xSize         => $xsize_ratio,
                 hide_asterisk => 1,
-                               text         => 0, 
+               text          => 0, 
+                mode          => 'graphic',  # the only other option here is Type3...
             );
         };
 
@@ -1370,6 +1373,7 @@ sub build_circ_barcode {
                 xSize => .85,
 
                 ySize => 1.3,
+                mode            => 'graphic',  # the only other option here is Type3...
             );
         };
         if ($@) {