Fixed bug #1013. Works for me, if someone can check.
authordoxulting <doxulting>
Wed, 5 Oct 2005 16:19:21 +0000 (16:19 +0000)
committerdoxulting <doxulting>
Wed, 5 Oct 2005 16:19:21 +0000 (16:19 +0000)
search.marc/search.pl

index 8ba60de..6d0d88f 100755 (executable)
@@ -130,7 +130,15 @@ if ($op eq "do_search") {
                        if ($tag) {
                                push @tags,$dbh->quote("$tag$subfield");
                        } else {
-                               push @tags, $dbh->quote(substr($marc,0,4));
+                               if ($marc =~ /^(\d){3}(. -)(.)*/)
+                               {
+                                       # The user is using the search catalogue part, more fields
+                                       push @tags, $dbh->quote(substr($marc,0,4));
+                               }
+                               else
+                               {
+                                       push @tags, $marc;
+                               }
                        }
                } else {
                        push @tags, "";