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

Joshua Ferraro jmf at kados.org
Fri Nov 3 03:59:05 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Joshua Ferraro <kados>	06/11/03 02:59:05

Modified files:
	z3950          : search.pl 

Log message:
	working!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/search.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.6.2.2&r2=1.3.2.6.2.3

Patches:
Index: search.pl
===================================================================
RCS file: /sources/koha/koha/z3950/search.pl,v
retrieving revision 1.3.2.6.2.2
retrieving revision 1.3.2.6.2.3
diff -u -b -r1.3.2.6.2.2 -r1.3.2.6.2.3
--- search.pl	3 Nov 2006 02:39:36 -0000	1.3.2.6.2.2
+++ search.pl	3 Nov 2006 02:59:05 -0000	1.3.2.6.2.3
@@ -65,7 +65,8 @@
 	$random =rand(1000000000);
 }
 
-my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "z3950/searchresult.tmpl",
+my ($template, $loggedinuser, $cookie)= get_template_and_user({
+				template_name => "z3950/searchresult.tmpl",
 				query => $input,
 				type => "intranet",
 				authnotrequired => 1,
@@ -73,7 +74,8 @@
 				debug => 1,
 				});
 
-$template->param(	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+$template->param(
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
 		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
 		IntranetNav => C4::Context->preference("IntranetNav"));
 
@@ -112,20 +114,21 @@
 	} 
 
 	my $query="\@attr $attr \"$term\"";	
-	foreach my $servid ( @id){
+	foreach my $servid (@id){
 		my $sth=$dbh->prepare("select * from z3950servers where id=?");
 		$sth->execute($servid);
     	while ($server=$sth->fetchrow_hashref) {
 			my $noconnection=0;							
 			my $option1=new ZOOM::Options();
-			$option1->option(async=>1);
+			$option1->option('async'=>1);
 			$option1->option('elementSetName', 'F');
 			$option1->option('databaseName',$server->{db})  ;
 			$option1->option('user',$server->{userid}) if $server->{userid};
 			$option1->option('password',$server->{password})  if $server->{password};
 			$option1->option('preferredRecordSyntax', $server->{syntax});
 			$oConnection[$s]=create ZOOM::Connection($option1) || warn ("something went wrong: ".$oConnection[$s]->errmsg());
-			$oConnection[$s]->connect($server->{name}, $server->{port}) || warn ("something went wrong: ".$oConnection[$s]->errmsg());
+			warn ("server data",$server->{name}, $server->{port});
+			$oConnection[$s]->connect($server->{host}, $server->{port}) || warn ("something went wrong: ".$oConnection[$s]->errmsg());
 			$serverhost[$s]=$server->{host};
 			$encoding[$s]=$server->{syntax};
 			$s++;





More information about the Koha-cvs mailing list