[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/z3950 processz3950queue,1.13,1.14 search.pl,1.3,1.4
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/z3950 processz3950queue,1.13,1.14 search.pl,1.3,1.4 |
Date: |
Wed, 04 May 2005 02:04:55 -0700 |
Update of /cvsroot/koha/koha/z3950
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21762/z3950
Modified Files:
processz3950queue search.pl
Log Message:
synch'ing 2.2 and head
Index: processz3950queue
===================================================================
RCS file: /cvsroot/koha/koha/z3950/processz3950queue,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** processz3950queue 17 Nov 2004 12:43:54 -0000 1.13
--- processz3950queue 4 May 2005 09:04:52 -0000 1.14
***************
*** 105,113 ****
$<=$uid;
}
! my $db_driver = $context->{"config"}{"db_scheme"} || "mysql";
! my $db_name = $context->{"config"}{"database"};
! my $db_host = $context->{"config"}{"hostname"};
! my $db_user = $context->{"config"}{"user"};
! my $db_passwd = $context->{"config"}{"pass"};
my $dbh = DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user,
$db_passwd);
--- 105,113 ----
$<=$uid;
}
! my $db_driver = C4::Context->config("db_scheme") || "mysql";
! my $db_name = C4::Context->config("database");
! my $db_host = C4::Context->config("hostname");
! my $db_user = C4::Context->config("user");
! my $db_passwd = C4::Context->config("pass");
my $dbh = DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user,
$db_passwd);
***************
*** 133,137 ****
while (1) {
if ((time-$lastrun)>5) {
- print "starting loop\n";
$checkqueue = 1; # FIXME during testing, this line forces the
loop. REMOVE it to use SIG{HUP} when "daemonized" !
# clean DB
--- 133,136 ----
***************
*** 184,194 ****
} else {
# and connect to z3950 server
! # new connection required ($dbi) because we might have forked (thanks Harry
Jackson)
! my $db_driver =
$context->{"config"}{"db_scheme"} || "mysql";
! my $db_name =
$context->{"config"}{"database"};
! my $db_host =
$context->{"config"}{"hostname"};
! my $db_user =
$context->{"config"}{"user"};
! my $db_passwd =
$context->{"config"}{"pass"};
my $dbi =
DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user, $db_passwd);
my ($name, $server,
$database, $user, $password,$syntax) = split(/\//, $serverinfo, 6);
$globalname=$name;
--- 183,194 ----
} else {
# and connect to z3950 server
! #FIXME: why do we need $dbi ? can't we use $dbh ?
! my $db_driver =
C4::Context->config("db_scheme") || "mysql";
! my $db_name =
C4::Context->config("database");
! my $db_host =
C4::Context->config("hostname");
! my $db_user =
C4::Context->config("user");
! my $db_passwd =
C4::Context->config("pass");
my $dbi =
DBI->connect("DBI:$db_driver:$db_name:$db_host",$db_user, $db_passwd);
+
$dbh->{"InactiveDestroy"} = "true";
my ($name, $server,
$database, $user, $password,$syntax) = split(/\//, $serverinfo, 6);
$globalname=$name;
***************
*** 258,262 ****
print "$$/$id :
connected to $globalname\n";
eval
{$conn->option(elementSetName => 'F')};
! eval {
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if
($globalsyntax eq "USMARC");
eval {
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if
($globalsyntax eq "UNIMARC");
if ($@) {
--- 258,262 ----
print "$$/$id :
connected to $globalname\n";
eval
{$conn->option(elementSetName => 'F')};
! eval {
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if
($globalsyntax eq "MARC21");
eval {
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if
($globalsyntax eq "UNIMARC");
if ($@) {
***************
*** 283,294 ****
my $marcdata;
# use render() or rawdata() depending on the type of the returned record
-
my $marcrecord;
if (ref($rec) eq "Net::Z3950::Record::USMARC") {
$marcdata = $rec->rawdata();
-
$marcrecord = MARC::File::USMARC::decode($rec->rawdata())
}
if (ref($rec) eq "Net::Z3950::Record::UNIMARC") {
!
$marcdata = $rec->render();
!
$marcrecord = MARC::File::USMARC::decode($rec->render())
}
$globalencoding = ref($rec);
--- 283,291 ----
my $marcdata;
# use render() or rawdata() depending on the type of the returned record
if (ref($rec) eq "Net::Z3950::Record::USMARC") {
$marcdata = $rec->rawdata();
}
if (ref($rec) eq "Net::Z3950::Record::UNIMARC") {
!
$marcdata = $rec->rawdata();
}
$globalencoding = ref($rec);
Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/z3950/search.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** search.pl 11 Feb 2004 08:44:28 -0000 1.3
--- search.pl 4 May 2005 09:04:52 -0000 1.4
***************
*** 28,31 ****
--- 28,32 ----
use C4::Z3950;
use C4::Search;
+ use C4::Breeding;
use HTML::Template;
use MARC::File::USMARC;
***************
*** 77,81 ****
# fill with books in breeding farm
! ($count, @results) = breedingsearch($title,$isbn,$random);
my $numberpending= &checkz3950searchdone($random);
my @breeding_loop = ();
--- 78,82 ----
# fill with books in breeding farm
! ($count, @results) = BreedingSearch($title,$isbn,$random);
my $numberpending= &checkz3950searchdone($random);
my @breeding_loop = ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/z3950 processz3950queue,1.13,1.14 search.pl,1.3,1.4,
Paul POULAIN <=