From af3383f0b68c6ec971e0bb674281aa335ad5aa21 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Fri, 10 May 2002 22:34:36 +0000 Subject: [PATCH] Cleaned up formatting of dewey number before returning result from Search.pm --- html-template/Search.pm | 2 ++ html-template/cmsdsearchresults.tmpl | 12 ++++++------ html-template/search.pl | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/html-template/Search.pm b/html-template/Search.pm index dcd7ac8e32..2c7395ba32 100755 --- a/html-template/Search.pm +++ b/html-template/Search.pm @@ -279,6 +279,8 @@ sub KeywordSearch { ($dewey == 0) && ($dewey=''); ($dewey) && ($dewey.=" $subclass") ; $sth->finish; + $data2->{dewey}=~s/[\.0]*$//; + ($data2->{dewey}==0) && ($data2->{dewey}=''); push @$resulthash, $data2; $res2[$i]="$data2->{'author'}\t$data2->{'title'}\t$data2->{'biblionumber'}\t$data2->{'copyrightdate'}\t$dewey"; $i++; diff --git a/html-template/cmsdsearchresults.tmpl b/html-template/cmsdsearchresults.tmpl index bf69663ee2..12a19db370 100644 --- a/html-template/cmsdsearchresults.tmpl +++ b/html-template/cmsdsearchresults.tmpl @@ -3,16 +3,16 @@ - - +
TitleAuthorDewey
+ - - - + + + - +
TitleAuthorDewey
&startfrom=>Next Records
&startfrom=>Next Records

diff --git a/html-template/search.pl b/html-template/search.pl index 8bdf82eb3a..3056dc968a 100755 --- a/html-template/search.pl +++ b/html-template/search.pl @@ -28,7 +28,8 @@ my $template = HTML::Template->new(filename => $templatename, die_on_bad_params my $blah; my %search; -$search{'keyword'}='bear'; +my $keyword='bear'; +$search{'keyword'}=$keyword; my ($count, $resultshash, @results) = &KeywordSearch(\$blah, 'intra', \%search, 20, $startfrom); -- 2.39.5