Bug 7143: Updating history and about file
[koha.git] / C4 / Matcher.pm
index 9d1df67..59b5876 100644 (file)
@@ -29,7 +29,7 @@ use vars qw($VERSION);
 
 BEGIN {
        # set the version for version checking
-       $VERSION = 3.01;
+    $VERSION = 3.07.00.049;
 }
 
 =head1 NAME
@@ -95,6 +95,22 @@ sub GetMatcherList {
     return @results;
 }
 
+=head2 GetMatcherId
+
+  my $matcher_id = C4::Matcher::GetMatcherId($code);
+
+Returns the matcher_id of a code.
+
+=cut
+
+sub GetMatcherId {
+    my ($code) = @_;
+    my $dbh = C4::Context->dbh;
+
+    my $matcher_id = $dbh->selectrow_array("SELECT matcher_id FROM marc_matchers WHERE code = ?", undef, $code);
+    return $matcher_id;
+}
+
 =head1 METHODS
 
 =head2 new