From 677fd7ea0c45c996547cea13382bf09c331fd209 Mon Sep 17 00:00:00 2001 From: joshferraro Date: Fri, 23 Apr 2004 01:15:52 +0000 Subject: [PATCH] Changing version numbers to correspond with CVS Fixed the substitution bug (e.g., 4=100 before 4=1); Added support for the truncation attribute (5=1 and 5=100; thanks to Tomasz M. Wolniewicz for pointing out these improvements) --- z3950/server/zed-koha-server.pl | 61 +++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/z3950/server/zed-koha-server.pl b/z3950/server/zed-koha-server.pl index 3b493f941a..3e5c5b16ef 100755 --- a/z3950/server/zed-koha-server.pl +++ b/z3950/server/zed-koha-server.pl @@ -19,7 +19,7 @@ # #----------------------------------- # Script Name: zed-koha-server.pl -# Script Version: 0.02 +# Script Version: 1.3 # Date: 2004/04/14 # Author: Joshua Ferraro [jmf at kados dot org] # Description: A very basic Z3950 Server @@ -31,6 +31,11 @@ # Bath compliant to Level 1 in Functional Areas A, B. # 0.02 2004/04/14: Cleaned up documentation, etc. No functional # changes. +# 1.30 2004/04/22: Changing version numbers to correspond with CVS; +# Fixed the substitution bug (e.g., 4=100 before 4=1); +# Added support for the truncation attribute (5=1 and +# 5=100; thanks to Tomasz M. Wolniewicz for pointing +# out these improvements) #----------------------------------- # Note: After installing SimpleServer (indexdata.dk/simpleserver) and # changing the leader information in Koha's MARCgetbiblio subroutine in @@ -114,16 +119,17 @@ sub search_handler { ## Bib-1 Structure Attributes: $query =~ s|\@attr||g; + $query =~ s|4=100||g; ## date (un-normalized) + $query =~ s|4=101||g; ## name (normalized) + $query =~ s|4=102||g; ## sme (un-normalized) $query =~ s|4=1||g; ## Phrase $query =~ s|4=2||g; ## Keyword $query =~ s|4=3||g; ## Key $query =~ s|4=4||g; ## year $query =~ s|4=5||g; ## Date (normalized) $query =~ s|4=6||g; ## word list - $query =~ s|4=100||g; ## date (un-normalized) - $query =~ s|4=101||g; ## name (normalized) - $query =~ s|4=102||g; ## sme (un-normalized) - + $query =~ s|5=100||g; ## truncation + $query =~ s|5=1||g; ## truncation $query =~ s|\@and ||g; $query =~ s|2=3||g; @@ -146,16 +152,18 @@ sub search_handler { ## Bib-1 Structure Attributes: $query =~ s|\@attr ||g; + $query =~ s|4=100||g; ## date (un-normalized) + $query =~ s|4=101||g; ## name (normalized) + $query =~ s|4=102||g; ## sme (un-normalized) $query =~ s|4=1||g; ## Phrase $query =~ s|4=2||g; ## Keyword $query =~ s|4=3||g; ## Key $query =~ s|4=4||g; ## year $query =~ s|4=5||g; ## Date (normalized) $query =~ s|4=6||g; ## word list - $query =~ s|4=100||g; ## date (un-normalized) - $query =~ s|4=101||g; ## name (normalized) - $query =~ s|4=102||g; ## sme (un-normalized) - + $query =~ s|5=100||g; ## truncation + $query =~ s|5=1||g; ## truncation + $query =~ s|2=3||g; $query =~ s|"||g; $query =~ s| |%|g; @@ -176,16 +184,18 @@ sub search_handler { ## Bib-1 Structure Attributes: $query =~ s|\@attr||g; - $query =~ s|4=1||g; ## Phrase + $query =~ s|4=100||g; ## date (un-normalized) + $query =~ s|4=101||g; ## name (normalized) + $query =~ s|4=102||g; ## sme (un-normalized) + $query =~ s|4=1||g; ## Phrase $query =~ s|4=2||g; ## Keyword $query =~ s|4=3||g; ## Key $query =~ s|4=4||g; ## year $query =~ s|4=5||g; ## Date (normalized) $query =~ s|4=6||g; ## word list - $query =~ s|4=100||g; ## date (un-normalized) - $query =~ s|4=101||g; ## name (normalized) - $query =~ s|4=102||g; ## sme (un-normalized) - + $query =~ s|5=100||g; ## truncation + $query =~ s|5=1||g; ## truncation + $query =~ s|2=3||g; #$query =~ s|\@and||g; $query .= "\%"; ## Add the wildcard to search term @@ -203,17 +213,19 @@ sub search_handler { ## Bib-1 Structure Attributes: $query =~ s|\@attr ||g; - + $query =~ s|4=100||g; ## date (un-normalized) + $query =~ s|4=101||g; ## name (normalized) + $query =~ s|4=102||g; ## sme (un-normalized) + $query =~ s|4=1||g; ## Phrase $query =~ s|4=2||g; ## Keyword $query =~ s|4=3||g; ## Key $query =~ s|4=4||g; ## year $query =~ s|4=5||g; ## Date (normalized) $query =~ s|4=6||g; ## word list - $query =~ s|4=100||g; ## date (un-normalized) - $query =~ s|4=101||g; ## name (normalized) - $query =~ s|4=102||g; ## sme (un-normalized) - + $query =~ s|5=100||g; ## truncation + $query =~ s|5=1||g; ## truncation + $query .= "\%"; ## Add the wildcard to search term print "$query\n"; my $sql_query = "SELECT biblionumber FROM bibliosubject WHERE subject LIKE ?"; @@ -227,16 +239,19 @@ sub search_handler { ## Bib-1 Structure Attributes: $query =~ s|\@attr||g; + $query =~ s|4=100||g; ## date (un-normalized) + $query =~ s|4=101||g; ## name (normalized) + $query =~ s|4=102||g; ## sme (un-normalized) + $query =~ s|4=1||g; ## Phrase $query =~ s|4=2||g; ## Keyword $query =~ s|4=3||g; ## Key $query =~ s|4=4||g; ## year $query =~ s|4=5||g; ## Date (normalized) $query =~ s|4=6||g; ## word list - $query =~ s|4=100||g; ## date (un-normalized) - $query =~ s|4=101||g; ## name (normalized) - $query =~ s|4=102||g; ## sme (un-normalized) - + $query =~ s|5=100||g; ## truncation + $query =~ s|5=1||g; ## truncation + $query .= "\%"; ## Add the wildcard to search term print "$query\n"; my $sql_query = "SELECT bibid FROM marc_word WHERE word LIKE?"; -- 2.11.0