[Koha-cvs] koha/z3950 search.pl [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Mon Feb 26 16:05:53 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Henri-Damien LAURENT <hdl>	07/02/26 15:05:53

Modified files:
	z3950          : search.pl 

Log message:
	Reintroducing limit to 80 results so that long list can get some results.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/search.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.3.2.17&r2=1.3.2.18

Patches:
Index: search.pl
===================================================================
RCS file: /sources/koha/koha/z3950/search.pl,v
retrieving revision 1.3.2.17
retrieving revision 1.3.2.18
diff -u -b -r1.3.2.17 -r1.3.2.18
--- search.pl	26 Feb 2007 14:03:17 -0000	1.3.2.17
+++ search.pl	26 Feb 2007 15:05:53 -0000	1.3.2.18
@@ -146,7 +146,6 @@
 		}## while fetch
 	}# foreach
 	my $nremaining = $s;
-# 	my $firstresult=1;
 
 	my $k;
 	my $event;
@@ -157,12 +156,12 @@
           my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k-1]->error_x();
           if ($error) {
               warn "$k $serverhost[$k - 1] error $query: $errmsg ($error) $addinfo\n";
-          }
+            }else {
           my $numresults=$oResult[$k-1]->size() ;								
           my $i;
           my $result='';
           if ($numresults>0){
-              for ($i=0; $i<$numresults ; $i++) {
+              for ($i=0; $i<($numresults>80?80:$numresults) ; $i++) {
                   my $rec=$oResult[$k-1]->record($i); 										
                   my $marcrecord;
                   $marcdata = $rec->raw();											
@@ -192,12 +191,12 @@
                   $row_data{oldbiblionumber}=$biblionumber;
                   push (@breeding_loop, \%row_data);
               }
-      
           }#$numresults
           else {
             warn "no results for $serverhost[$k - 1]";
           }
         }
+          }
         
 	}
 
@@ -206,11 +205,4 @@
 	);
 	output_html_with_http_headers $input, $cookie, $template->output;
 
-# 	print  $template->output  if $firstresult !=1;
-#     $firstresult++;
-
-#     MAYBE_AGAIN:
-#         if (--$nremaining > 0) {
-#             goto AGAIN;
-#         }
 } ## if op=search





More information about the Koha-cvs mailing list