CVS: koha/acqui newbasket2.pl,1.1.1.1,1.2
Update of /cvsroot/koha/koha/acqui In directory usw-pr-cvs1:/tmp/cvs-serv15194/acqui Modified Files: newbasket2.pl Log Message: Now use the new hash based results returned from Search.pm Index: newbasket2.pl =================================================================== RCS file: /cvsroot/koha/koha/acqui/newbasket2.pl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** newbasket2.pl 19 Dec 2000 23:45:56 -0000 1.1.1.1 --- newbasket2.pl 7 May 2002 00:09:06 -0000 1.2 *************** *** 30,36 **** my $title=$input->param('search'); $search{'title'}=$title; ! my $keyword=$input->param('search'); $search{'keyword'}=$keyword; ! my $author=$input->param('search'); $search{'author'}=$author; --- 30,36 ---- my $title=$input->param('search'); $search{'title'}=$title; ! my $keyword=$input->param('d'); $search{'keyword'}=$keyword; ! my $author=$input->param('author'); $search{'author'}=$author; *************** *** 46,52 **** my $id=$input->param('id'); my $basket=$input->param('basket'); ! my ($count,@booksellers)=bookseller($id); - print startpage(); print startpage(); --- 46,56 ---- my $id=$input->param('id'); my $basket=$input->param('basket'); ! my $sub=$input->param('sub'); ! my $donation; ! if ($id == 72){ ! $donation='yes'; ! } ! #print $sub; my ($count,@booksellers)=bookseller($id); print startpage(); *************** *** 54,60 **** print mkheadr(1,"Shopping Basket For: $booksellers[0]->{'name'}"); print <<printend ! ! <a href=newbiblio.pl?id=$id&basket=$basket><img src=/images/add-biblio.gif width=187 heigth=42 border=0 align=right alt="Add New Biblio"></a> <a href=basket.pl?basket=$basket><img src=/images/view-basket.gif width=187 heigth=42 border=0 align=right alt="View Basket"></a> --- 58,68 ---- print mkheadr(1,"Shopping Basket For: $booksellers[0]->{'name'}"); + if ($donation ne 'yes'){ + print "<a href=newbiblio.pl?id=$id&basket=$basket&sub=$sub>"; + } else { + print "<a href=newdonation.pl?id=$id&basket=$basket&sub=$sub>"; + } print <<printend ! <img src=/images/add-biblio.gif width=187 heigth=42 border=0 align=right alt="Add New Biblio"></a> <a href=basket.pl?basket=$basket><img src=/images/view-basket.gif width=187 heigth=42 border=0 align=right alt="View Basket"></a> *************** *** 72,84 **** my @results; ! if ($keyword ne ''){ ! # print "hey"; ! ($count,@results)=&KeywordSearch(\$blah,'intra',\%search,$num,$offset); ! } elsif ($search{'front'} ne '') { ! ($count,@results)&FrontSearch(\$blah,'intra',\%search,$num,$offset); ! }else { ($count,@results)=&CatSearch(\$blah,'loose',\%search,$num,$offset); ! # print "hey"; ! } print "You searched on "; --- 80,86 ---- my @results; ! ($count,@results)=&CatSearch(\$blah,'loose',\%search,$num,$offset); ! print "You searched on "; *************** *** 111,125 **** while ($i < $count2){ # print $results[$i]."\n"; ! my @stuff=split('\t',$results[$i]); ! $stuff[1]=~ s/\`/\\\'/g; ! my $title2=$stuff[1]; ! my $author2=$stuff[0]; ! my $copyright=$stuff[3]; $author2=~ s/ /%20/g; $title2=~ s/ /%20/g; $title2=~ s/\#/\&\#x23;/g; ! $stuff[1]=mklink("/cgi-bin/koha/acqui/newbiblio.pl?title=$title2&author=$author2©right=$copyright&id=$id&basket=$basket&biblio=$stuff[2]",$stuff[1]); ! my $word=$stuff[0]; ! # print $word; $word=~ s/([a-z]) +([a-z])/$1%20$2/ig; $word=~ s/ //g; --- 113,134 ---- while ($i < $count2){ # print $results[$i]."\n"; ! # my @stuff=split('\t',$results[$i]); ! my $result=$results[$i]; ! $result->{'title'}=~ s/\`/\\\'/g; ! my $title2=$result->{'title'}; ! my $author2=$result->{'author'}; ! my $copyright=$result->{'copyrightdate'}; $author2=~ s/ /%20/g; $title2=~ s/ /%20/g; $title2=~ s/\#/\&\#x23;/g; ! $title2=~ s/\"/\"\;/g; ! my $itemcount; ! my $location=''; ! if ($donation eq 'yes'){ ! $result->{'title'}=mklink("/cgi-bin/koha/acqui/newdonation.pl?author=$author2©right=$copyright&id=$id&basket=$basket&biblio=$result->{'biblionumber'}&title=$title2",$result->{'title'}); ! } else { ! $result->{'title'}=mklink("/cgi-bin/koha/acqui/newbiblio.pl?sub=$sub&author=$author2©right=$copyright&id=$id&basket=$basket&biblio=$result->{'biblionumber'}&title=$title2",$result->{'title'}); ! } ! my $word=$result->{'author'}; $word=~ s/([a-z]) +([a-z])/$1%20$2/ig; $word=~ s/ //g; *************** *** 128,189 **** $word=~ s/\n//g; my $url="/cgi-bin/koha/search.pl?author=$word&type=$type"; ! $stuff[0]=mklink($url,$stuff[0]); ! my ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit)=itemcount($env,$stuff[2],$type); ! $stuff[4]=$count; if ($nacount > 0){ ! $stuff[5]=$stuff[5]."On Loan"; if ($nacount >1 ){ ! $stuff[5]=$stuff[5]." ($nacount)"; } ! $stuff[5].=" "; } if ($lcount > 0){ ! $stuff[5]=$stuff[5]."Levin"; if ($lcount >1 ){ ! $stuff[5]=$stuff[5]." ($lcount)"; } ! $stuff[5].=" "; } if ($fcount > 0){ ! $stuff[5]=$stuff[5]."Foxton"; if ($fcount >1 ){ ! $stuff[5]=$stuff[5]." ($fcount)"; } ! $stuff[5].=" "; } if ($scount > 0){ ! $stuff[5]=$stuff[5]."Shannon"; if ($scount >1 ){ ! $stuff[5]=$stuff[5]." ($scount)"; } ! $stuff[5].=" "; } if ($lostcount > 0){ ! $stuff[5]=$stuff[5]."Lost"; if ($lostcount >1 ){ ! $stuff[5]=$stuff[5]." ($lostcount)"; } ! $stuff[5].=" "; } if ($mending > 0){ ! $stuff[5]=$stuff[5]."Mending"; if ($mending >1 ){ ! $stuff[5]=$stuff[5]." ($mending)"; } ! $stuff[5].=" "; } if ($transit > 0){ ! $stuff[5]=$stuff[5]."In Transiit"; if ($transit >1 ){ ! $stuff[5]=$stuff[5]." ($transit)"; } ! $stuff[5].=" "; } if ($colour == 1){ ! print mktablerow(6,$secondary,$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]); $colour=0; } else{ ! print mktablerow(6,'white',$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]); $colour=1; } --- 137,198 ---- $word=~ s/\n//g; my $url="/cgi-bin/koha/search.pl?author=$word&type=$type"; ! $result->{'author'}=mklink($url,$result->{'author'}); ! my ($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit)=itemcount($env,$result->{'biblionumber'},$type); ! $itemcount=$count; if ($nacount > 0){ ! $location=$location."On Loan"; if ($nacount >1 ){ ! $location=$location." ($nacount)"; } ! $location.=" "; } if ($lcount > 0){ ! $location=$location."Levin"; if ($lcount >1 ){ ! $location=$location." ($lcount)"; } ! $location.=" "; } if ($fcount > 0){ ! $location=$location."Foxton"; if ($fcount >1 ){ ! $location=$location." ($fcount)"; } ! $location.=" "; } if ($scount > 0){ ! $location=$location."Shannon"; if ($scount >1 ){ ! $location=$location." ($scount)"; } ! $location.=" "; } if ($lostcount > 0){ ! $location=$location."Lost"; if ($lostcount >1 ){ ! $location=$location." ($lostcount)"; } ! $location.=" "; } if ($mending > 0){ ! $location=$location."Mending"; if ($mending >1 ){ ! $location=$location." ($mending)"; } ! $location.=" "; } if ($transit > 0){ ! $location=$location."In Transiit"; if ($transit >1 ){ ! $location=$location." ($transit)"; } ! $location.=" "; } if ($colour == 1){ ! print mktablerow(6,$secondary,$result->{'title'},$result->{'author'},$result->{'copyrightdate'},$itemcount,$location); $colour=0; } else{ ! print mktablerow(6,'white',$result->{'title'},$result->{'author'},$result->{'copyrightdate'},$itemcount,$location); $colour=1; } *************** *** 196,200 **** print mktableft(); if ($offset < $count){ ! my $search="num=$num&offset=$offset&type=$type&id=$id&basket=$basket&search=$keyword"; my $stuff=mklink("/cgi-bin/koha/acqui/newbasket2.pl?$search",'Next'); print $stuff; --- 205,209 ---- print mktableft(); if ($offset < $count){ ! my $search="num=$num&offset=$offset&type=$type&id=$id&basket=$basket&search=$title&author=$author"; my $stuff=mklink("/cgi-bin/koha/acqui/newbasket2.pl?$search",'Next'); print $stuff;
participants (1)
-
Chris Cormack