From 9dbdedea0e9e0653db361e5da7b0d9e42941e812 Mon Sep 17 00:00:00 2001 From: Matthew Thiffault Date: Wed, 11 Mar 2009 00:54:50 -0400 Subject: [PATCH] Fixed a slight problem involving the script not searching for anything. --- library/index.cgi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/index.cgi b/library/index.cgi index 94334d8..7c0e8d8 100755 --- a/library/index.cgi +++ b/library/index.cgi @@ -14,9 +14,9 @@ print "Content-type: text/html\n\n"; $in = $ENV{'QUERY_STRING'}; @pairs = split(/[&=]/,$in); -%fields = @pairs; -chomp(%fields); -$webroot = "../../.."; +%field = @pairs; +chomp(%field); +$webroot = ".."; print <

\n"; #display the search form -if($fields{'do'} eq "home" || $fields{'do'} eq ""){ +if($field{'do'} eq "home" || $field{'do'} eq ""){ #isbn,title,authors,year,edition,publisher @@ -116,7 +116,7 @@ END } #query the database -if($fields{'do'} eq "query"){ +if($field{'do'} eq "query"){ print "

Search Results

"; @@ -131,15 +131,15 @@ if($fields{'do'} eq "query"){ $orterm = undef; @results; @oresults; - $title = $fields{'title'}; + $title = $field{'title'}; $title =~ s/[';:"]/ /g; - $publisher = $fields{'publisher'}; + $publisher = $field{'publisher'}; $publisher =~ s/[';:"]/ /g; - $edition = $fields{'edition'}; + $edition = $field{'edition'}; $edition =~ s/[';:"]/ /g; - $year = $fields{'year'}; + $year = $field{'year'}; $year =~ s/[';:"]/ /g; - $isbn = $fields{'isbn'}; + $isbn = $field{'isbn'}; $isbn =~ s/[';:"]/ /g; if($title){