From 686a41a71cd35992a8359f5e8ae3ba1ccd60cb23 Mon Sep 17 00:00:00 2001 From: shedges Date: Sat, 4 Sep 2004 13:48:27 +0000 Subject: [PATCH] Minor changes to add classification data to return array from loose search. --- C4/Search.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 6a37450701..85368ce188 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1235,7 +1235,7 @@ sub CatSearch { my $i=0; my $limit= $num+$offset; while (my $data=$sth->fetchrow_hashref){ - my $query="select dewey,subclass,publishercode from biblioitems where biblionumber=?"; + my $query="select classification,dewey,subclass,publishercode from biblioitems where biblionumber=?"; my @bind=($data->{'biblionumber'}); if ($search->{'class'} ne ''){ my @temp=split(/\|/,$search->{'class'}); @@ -1262,6 +1262,7 @@ sub CatSearch { } my $sti=$dbh->prepare($query); $sti->execute(@bind); + my $classification; my $dewey; my $subclass; my $true=0; @@ -1269,6 +1270,7 @@ sub CatSearch { my $bibitemdata; if ($bibitemdata = $sti->fetchrow_hashref()){ $true=1; + $classification=$bibitemdata->{'classification'}; $dewey=$bibitemdata->{'dewey'}; $subclass=$bibitemdata->{'subclass'}; $publishercode=$bibitemdata->{'publishercode'}; @@ -1278,6 +1280,7 @@ sub CatSearch { $dewey=~s/\.*0*$//; ($dewey == 0) && ($dewey=''); ($dewey) && ($dewey.=" $subclass"); + $data->{'classification'}=$classification; $data->{'dewey'}=$dewey; $data->{'publishercode'}=$publishercode; $sti->finish; -- 2.39.5