koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/z3950 processz3950queue search.pl z3950-da... [rel_3_0]


From: paul poulain
Subject: [Koha-cvs] koha/z3950 processz3950queue search.pl z3950-da... [rel_3_0]
Date: Fri, 17 Nov 2006 13:02:52 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     paul poulain <tipaul>   06/11/17 13:02:52

Removed files:
        z3950          : processz3950queue search.pl 
                         z3950-daemon-launch.sh z3950-daemon-shell.sh 

Log message:
        removing useless scripts : the z3950 client don't need daemon anymore

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/processz3950queue?cvsroot=koha&only_with_tag=rel_3_0&r1=1.16.2.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/search.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/z3950-daemon-launch.sh?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/z3950-daemon-shell.sh?cvsroot=koha&only_with_tag=rel_3_0&r1=1.5&r2=0

Patches:
Index: processz3950queue
===================================================================
RCS file: processz3950queue
diff -N processz3950queue
--- processz3950queue   4 Sep 2006 08:11:52 -0000       1.16.2.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,347 +0,0 @@
-#!/usr/bin/perl
-
-# $Id: processz3950queue,v 1.16.2.1 2006/09/04 08:11:52 toins Exp $
-use MARC::Record;
-use C4::Context;
-use DBI;
-use strict;
-use C4::Biblio;
-use C4::Output;
-use C4::Breeding;
-use ZOOM;
-
-=head1 NAME
-
-processz3950queue. The script that does z3950 searches.
-
-=head1 SYNOPSIS
-
-This script can be used on a console (as normal user) or by the daemon-launch 
script.
-
-Don't forget to EXPORT PERL5LIB=/PATH/to/KOHA before executing it if you use 
console mode.
-
-It :
-1- extracts z3950 requests from z3950queue table,
-2- creates entries in z3950results to store the result
-3- launch z3950 queries in asynchronous mode, using Unix fork()
-4- store results in marc_breeding table.
-
-The z3950 results queries are managed in z3950/search.pl script (poped-up 
window in MARC editor).
-
-=head1 DESCRIPTION
-
-=head2 table z3950servers
-
-This table stores the differents z3950 servers.
-A server is used if checked=1. The rank is NOT used as searches are now 
asynchronous.
-
-=head2 table z3950queue
-
-Table use to manage queries. A single line is created  in this table for each 
z3950 search request.
-If more than 1 server is called, the C<servers> field containt all of them 
separated by |.
-
-z3950 search requests are done by z3950/search.pl script.
-At this stage, the fields are created with C<startdate> and C<done> empty
-
-Then, the processz3950queue finds this entry and :
-1- store date (time()) in C<startdate>
-2- set C<done> = -1
-
-when the requests are all sent :
-2- set C<done> = 1
-3- set C<enddate> (FIXME: always equal to startdate for me)
-
-entries are deleted when :
-- C<startdate> is more than 1 day ago.
-
-FIXME:
-- results, numrecords fields are unused
-
-=head2 table z3950results
-
-1 entry is created for each request, for each server called.
-when created :
-* C<startdate> is filled
-* C<enddate> is null
-* active is set to 0. when active is 0, it means the request has not been 
sent. when set to 1, it means it's on the way.
-
-When a search is ended, C<enddate> is set, and C<active> is set to -1
-
-=head1 How it's written
-
-on every loop :
-* delete old queries
-* for each entry in z3950queue table that is not done=1 {
-       for each search request {
-               for each server {
-                       try to connect
-                       look for results
-                       *      results can be :
-                       - existing and already running on another process 
(active=1)
-                       - existing & finished (active=-1)
-                       - non existent => create it and run the request.
-               }
-       }
-}
-=over 2
-
-=cut
-
-
-if ($< == 0) {
-    # Running as root, switch privs
-    if (-d "/var/run") {
-       open PID, ">/var/run/processz3950queue.pid";
-       print PID $$."\n";
-       close PID;
-    }
-    # Get real apacheuser from koha.conf or reparsing httpd.conf
-    my $apacheuser=C4::Context->config("httpduser");
-    my $uid=0;
-    unless ($uid = (getpwnam($apacheuser))[2]) {
-       die "Attempt to run daemon as non-existent or superuser\n";
-    }
-    $>=$uid;
-    $<=$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);
-
-# we begin the script, so "unactive" every pending request : they will never 
give anything, the script died :-(
-my $sth=$dbh->prepare("update z3950results set active=0 where active<>-1");
-$sth->execute;
-$sth->finish;
-$SIG{CHLD}='reap';
-$SIG{HUP}='checkqueue';
-
-
-my $logdir=$ARGV[0];
-
-open PID, ">$logdir/processz3950queue.pid";
-print PID $$."\n";
-close PID;
-
-my $reapcounter=0;
-my $forkcounter=0;
-my $checkqueue=1;
-my $pid=$$;
-my $lastrun=0;
-while (1) {
-       if ((time-$lastrun)>5) {
-               $checkqueue = 1; # FIXME during testing, this line forces the 
loop. REMOVE it to use SIG{HUP} when "daemonized" !
-# clean DB
-               my $now = time();
-               # delete z3950queue entries that are more than 1 day old
-               my $sth = $dbh->prepare("delete from z3950queue where 
?-startdate > 86400");
-               $sth->execute($now);
-               # delete z3950results queries that are more than 1 hour old
-               $sth = $dbh->prepare("delete from z3950results where 
?-startdate > 3600");
-               $sth->execute($now);
-               if ($checkqueue) { # everytime a SIG{HUP} is recieved
-                       $checkqueue=0;
-# parse every entry in QUEUE
-                       $sth=$dbh->prepare("select 
id,term,type,servers,identifier from z3950queue where done<>1 or done is null 
order by id");
-                       $sth->execute;
-                       while (my ($id, $term, $type, $servers,$random) = 
$sth->fetchrow) {
-# FIXME: there is no "else". So, if more than 12 requests at the same time => 
requests are lost !
-                               if ($forkcounter<12) {
-                                       my $now=time();
-# search for results entries for this request
-                                       my $stk=$dbh->prepare("select 
id,server,startdate,enddate,numrecords,active from z3950results where 
queryid=?");
-                                       ($stk->execute($id)) || (next);
-                                       my %serverdone;
-# if no results => set queue to done = -1, set startdate and begin creating 
z3950results table entries & z3950 queries
-                                       unless ($stk->rows) {
-                                               my $sti=$dbh->prepare("update 
z3950queue set done=-1,startdate=? where id=?");
-                                               $sti->execute($now,$id);
-                                       }
-# check which servers calls have already been created (before a crash)
-                                       while (my ($r_id, 
$r_server,$r_startdate,$r_enddate,$r_numrecords,$active) = $stk->fetchrow) {
-                                               if ($r_enddate >0) { # result 
entry exist & finished
-                                                       
$serverdone{$r_server}=1;
-                                               } elsif ($active) { # result 
entry exists & on the way (active=1) or already done (active=-1)
-                                                       
$serverdone{$r_server}=1;
-                                               } else { # otherwise
-                                                       
$serverdone{$r_server}=-1;
-                                               }
-                                               # note that is the entry 
doesn't exist, the $serverdone{$r_server} is 0 (important later !)
-                                       }
-                                       $stk->finish;
-                                       foreach my $serverinfo (split(/\|/, 
$servers)) {
-                                               (next) if 
($serverdone{$serverinfo} == 1); #(otherwise, is 0 or -1)
-                                               my $totalrecords=0;
-                                               my $globalname;
-                                               my $globalsyntax;
-                                               my $globalencoding;
-# fork a process for this z3950 query
-                                               if (my $pid=fork()) {
-                                                       $forkcounter++;
-                                               } 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;
-                                                       $globalsyntax = $syntax;
-                                                       $server=~/(.*)\:(\d+)/;
-                                                       my $servername=$1;
-                                                       my $port=$2;
-                                                       my $attr='';
-                                                       if ($type eq 'isbn') {
-                                                               $attr='1=7';
-                                                       } elsif ($type eq 
'title') {
-                                                               $attr='1=4';
-                                                       } elsif ($type eq 
'author') {
-                                                               $attr='1=1003';
-                                                       } elsif ($type eq 
'lccn') {
-                                                               $attr='1=9';
-                                                       } elsif ($type eq 
'keyword') {
-                                                               $attr='1=1016';
-                                                       }
-                                                       my $query = 
"address@hidden $attr \"$term\"";
-                                                       print "$$/$id : 
Processing $type=$term at $name $server $database $syntax (".($forkcounter+1)." 
forks)\n";
-# try to connect
-                                                       my $conn;
-                                                       my $noconnection=0;
-                                                       my $error=0;
-# the z3950 query is builded. Launch it.
-                                                       if ($user) {
-                                                               $conn= new 
ZOOM::Connection($servername, $port, databaseName => $database, user => $user, 
password => $password) || ($noconnection=1);
-                                                       } else {
-                                                               $conn= new 
ZOOM::Connection($servername, $port, databaseName => $database) || 
($noconnection=1);
-                                                       }
-                                                       if ($noconnection || 
$error) {
-# if connection impossible, don't go further !
-                                                               print "$$/$id : 
no connection at $globalname\n";
-                                                               my $result = 
MARC::Record->new();
-                                                               my 
($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) = 
ImportBreeding($result,-1,"$globalname server is NOT responding","",$random);
-                                                       } else {
-# else, build z3950 query and do it !
-                                                               $now=time();
-                                                               my 
$resultsid="";
-       # create z3950results entries.
-                                                               if 
($serverdone{$serverinfo}==-1) { # if entry exist, just retrieve it
-                                                                       my 
$stj=$dbi->prepare("select id from z3950results where server=? and queryid=?");
-                                                                       
$stj->execute($serverinfo,$id);
-                                                                       
($resultsid) = $stj->fetchrow;
-                                                                       
$stj->finish;
-                                                                       print 
"$$/$id : 1 >> $resultsid\n";
-                                                               } else { # else 
create it : (may be serverdone=1 or 0)
-                                                                       my 
$stj=$dbi->prepare("select id from z3950results where server=? and queryid=?");
-                                                                       
$stj->execute($serverinfo,$id);
-                                                                       
($resultsid) = $stj->fetchrow;
-                                                                       
$stj->finish;
-                                                                       print 
"$$/$id : 2 >> $resultsid\n";
-                                                                       unless 
($resultsid) {
-                                                                               
$stj=$dbi->prepare("insert into z3950results (server, queryid, startdate) 
values (?,?,?)");
-                                                                               
$stj->execute($serverinfo, $id, $now);
-                                                                               
$resultsid=$dbi->{'mysql_insertid'};
-                                                                               
$stj->finish;
-                                                                               
print "$$/$id : creating and ";
-                                                                       }
-                                                               }
-                                                               print "$$/$id : 
working on results entry $resultsid\n";
-       # set active to 1 => this request is on the way.
-                                                               my 
$stj=$dbi->prepare("update z3950results set active=1 where id=?");
-                                                               
$stj->execute($resultsid);
-#######
-                                                               print "$$/$id : 
connected to $globalname\n";
-                                                               print "Global 
Syntax =>".$globalsyntax."<=";
-                                                               eval 
{$conn->option(elementSetName => 'F')};
-                                                               eval { 
$conn->option(preferredRecordSyntax => 'USMARC');} if ($globalsyntax eq 
"USMARC" or $globalsyntax eq 'MARC21');
-                                                               eval { 
$conn->option(preferredRecordSyntax => 'UNIMARC');} if ($globalsyntax eq 
"UNIMARC");
-                                                               if ($@) {
-                                                                       print 
"$$/$id : $globalname ERROR: $@ for $resultsid\n";
-       # in case pb during connexion, set result to "empty" to avoid 
everlasting loops
-                                                                       my 
$stj=$dbi->prepare("update z3950results set 
numrecords=?,numdownloaded=?,highestseen=0,results='',enddate=? where id=?");
-                                                                       
$stj->execute(0,0,$now,$resultsid);
-                                                               } else {
-                                                                       my 
$rs=$conn->search_pqf($query) or warn "Connection Problem:".$conn->errmsg();
-                                                                       pe();
-       # we have an answer for a query => get results & store them in 
marc_breeding table
-                                                                       my 
$numresults=$rs->size();
-                                                                       if 
($numresults eq 0) {
-                                                                               
print "$$/$id : $globalname : no records found\n";
-                                                                       } else {
-                                                                               
print "$$/$id : $globalname : $numresults records found, retrieving them (max 
80)\n";
-                                                                       }
-                                                                       pe();
-                                                                       my $i;
-                                                                       my 
$result='';
-                                                                       my 
$scantimerstart=time();
-                                                                       for 
($i=1; $i<=(($numresults<80) ? ($numresults) : (80)); $i++) {
-                                                                               
my $rec=$rs->record($i-1);
-                                                                               
my $marcdata = $rec->raw();
-                                                                               
#my $marcrecord = MARC::Record->new_from_usmarc($marcdata);
-                                                                               
#warn $marcrecord->as_formatted(); 
-                                                                               
$globalencoding = ref($rec);
-                                                                               
$result.=$marcdata;
-                                                                       }
-                                                                       my 
@x=split /::/,$globalencoding;
-                                                                       my 
($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) = 
ImportBreeding($result,-1,"Z3950-$globalname",$x[3],$random);
-                                                                       my 
$scantimerend=time();
-                                                                       my 
$numrecords;
-                                                                       
($numresults<80) ? ($numrecords=$numresults) : ($numrecords=80);
-                                                                       my 
$elapsed=$scantimerend-$scantimerstart;
-                                                                       if 
($elapsed) {
-                                                                               
my $speed=int($numresults/$elapsed*100)/100;
-                                                                               
print "$$/$id : $globalname : $server records retrieved $numrecords SPEED: 
$speed\n";
-                                                                       }
-                                                                       my 
$q_result=$dbi->quote($result);
-                                                                       
($q_result) || ($q_result='""');
-                                                                       
$now=time();
-                                                                       if 
($numresults >0) {
-                                                                               
my $stj=$dbi->prepare("update z3950results set 
numrecords=?,numdownloaded=?,highestseen=0,results=?,enddate=? where id=?");
-                                                                               
$stj->execute($numresults,$numrecords,$q_result,$now,$resultsid);
-                                                                       } else 
{ # no results...
-                                                                               
my $stj=$dbi->prepare("update z3950results set 
numrecords=?,numdownloaded=?,highestseen=0,results='',enddate=? where id=?");
-                                                                               
$stj->execute($numresults,$numrecords,$now,$resultsid);
-                                                                       }
-                                                               }
-                                                               
$stj=$dbi->prepare("update z3950results set active=-1 where id=?");
-                                                               
$stj->execute($resultsid);
-                                                               eval {my 
$stj->finish};
-                                                       }
-#OK, the search is done inactivate it..
-                                                       print "$$/$id : $server 
search done.\n";
-                                                       exit;
-                                               }
-                                       }
-                               } else {
-# $forkcounter >=12
-                               }
-                               # delete z3950queue entry, as everything is done
-                               my $sti=$dbh->prepare("update z3950queue set 
done=1,enddate=? where id=?");
-                               $now=time();
-                               $sti->execute($now,$id);
-                       }
-                       $lastrun=time();
-               }
-               sleep 10;
-       }
-}
-
-sub reap {
-    $forkcounter--;
-    wait;
-}
-
-
-sub checkqueue {
-    $checkqueue=1;
-}
-
-
-sub pe {
-       return 0;
-}

Index: search.pl
===================================================================
RCS file: search.pl
diff -N search.pl
--- search.pl   4 Jul 2006 14:36:52 -0000       1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,112 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Biblio;
-use C4::Context;
-use C4::Koha; # XXX subfield_is_koha_internal_p
-use C4::Z3950;
-use C4::Search;
-use C4::Breeding;
-use HTML::Template;
-use MARC::File::USMARC;
-
-use vars qw( $tagslib );
-use vars qw( $is_a_modif );
-
-
-my $input = new CGI;
-my $dbh = C4::Context->dbh;
-my $error = $input->param('error');
-my $bibid=$input->param('bibid');
-my $title = $input->param('title');
-my $author = $input->param('author');
-my $isbn = $input->param('isbn');
-my $issn = $input->param('issn');
-my $random = $input->param('random');
-my @results;
-my $count;
-my $toggle;
-
-my $record;
-my $biblionumber;
-if ($bibid > 0) {
-       $record = MARCgetbiblio($dbh,$bibid);
-       $biblionumber=MARCfind_oldbiblionumber_from_MARCbibid($dbh,$bibid);
-}
-
-my $errmsg;
-unless ($random) { # if random is a parameter => we're just waiting for the 
search to end, it's a refresh.
-       if ($isbn) {
-               $random =rand(1000000000);
-               $errmsg = addz3950queue($isbn, "isbn", $random, 'CHECKED');
-       } elsif ($author) {
-               $random =rand(1000000000);
-               $errmsg = addz3950queue($author, "author", $random, 'CHECKED');
-       } elsif ($title) {
-               $random =rand(1000000000);
-               $errmsg = addz3950queue($title, "title", $random, 'CHECKED');
-       }
-}
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "z3950/searchresult.tmpl",
-                               query => $input,
-                               type => "intranet",
-                               authnotrequired => 0,
-                               flagsrequired => {catalogue => 1},
-                               debug => 1,
-                               });
-
-# fill with books in breeding farm
-($count, @results) = BreedingSearch($title,$isbn,$random);
-my $numberpending= &checkz3950searchdone($random);
-my @breeding_loop = ();
-for (my $i=0; $i <= $#results; $i++) {
-       my %row_data;
-       if ($i % 2) {
-               $toggle="#ffffcc";
-       } else {
-               $toggle="white";
-       }
-       $row_data{toggle} = $toggle;
-       $row_data{id} = $results[$i]->{'id'};
-       $row_data{isbn} = $results[$i]->{'isbn'};
-       $row_data{file} = $results[$i]->{'file'};
-       $row_data{title} = $results[$i]->{'title'};
-       $row_data{author} = $results[$i]->{'author'};
-       push (@breeding_loop, \%row_data);
-}
-
-$template->param(isbn => $isbn,
-                                               title => $title,
-                                               author => $author,
-                                               breeding_loop => address@hidden,
-                                               refresh => ($numberpending eq 0 
? "" : "search.pl?bibid=$bibid&random=$random"),
-                                               numberpending => $numberpending,
-                                               oldbiblionumber => 
$oldbiblio->{'biblionumber'},
-                                               );
-
-print $input->header(
--type => guesstype($template->output),
--cookie => $cookie
-),$template->output;

Index: z3950-daemon-launch.sh
===================================================================
RCS file: z3950-daemon-launch.sh
diff -N z3950-daemon-launch.sh
--- z3950-daemon-launch.sh      26 Oct 2005 09:13:54 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,83 +0,0 @@
-#!/bin/sh
-
-# $Id: z3950-daemon-launch.sh,v 1.6 2005/10/26 09:13:54 tipaul Exp $
-
-# Script to start Koha background Z39.50 search daemon
-
-# Part of the Koha Library Mgmt System -  www.koha.org
-# Licensed under the GPL
-
-#----------------------------
-# Call this script during system startup, such as from rc.local
-
-# Bugs/To Do:
-#   Needs SysV-type start/stop options
-
-#----------------------------
-. $(dirname $0)/z3950-daemon-options
-export KohaZ3950Dir
-
-#----------------------------
-if [ ! -d $KohaZ3950Dir ]
-then
-       echo ERROR: Cannot find Koha directory $KohaZ3950Dir
-       exit 1
-fi
-
-KohaZ3950Shell=$KohaZ3950Dir/z3950-daemon-shell.sh
-
-if [ ! -x $KohaZ3950Shell ]
-then
-       echo ERROR: Cannot find Koha Z39.50 daemon launcher $KohaZ3950Shell
-       exit 1
-fi
-
-su -c $KohaZ3950Shell - $RunAsUser &
-
-exit
-
-#--------------
-# $Log: z3950-daemon-launch.sh,v $
-# Revision 1.6  2005/10/26 09:13:54  tipaul
-# big commit, still breaking things...
-#
-# * synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should 
not be modified deeply.
-# * code cleaning (cleaning warnings from perl -w) continued
-#
-# Revision 1.4.4.1  2005/06/27 23:10:55  hdl
-# Removing -s from su call after Thomas D reports it breaks FreeBSD
-#
-# Revision 1.4  2003/11/05 23:33:45  slef
-# Now figures out what directory the scripts are in
-#
-# Revision 1.3  2003/10/06 09:10:39  slef
-# Removing config info from z3950*sh and using C4::Context in 
processz3950queue (Fixed bug 39)
-#
-# Revision 1.2  2003/04/29 16:48:25  tipaul
-# really proud of this commit :-)
-# z3950 search and import seems to works fine.
-# Let me explain how :
-# * a "search z3950" button is added in the addbiblio template.
-# * when clicked, a popup appears and z3950/search.pl is called
-# * z3950/search.pl calls addz3950search in the DB
-# * the z3950 daemon retrieve the records and stores them in z3950results AND 
in marc_breeding table.
-# * as long as there as searches pending, the popup auto refresh every 2 
seconds, and says how many searches are pending.
-# * when the user clicks on a z3950 result => the parent popup is called with 
the requested biblio, and auto-filled
-#
-# Note :
-# * character encoding support : (It's a nightmare...) In the z3950servers 
table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in 
this column. Depending on this, the char_decode in C4::Biblio.pm replaces 
marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import 
this value has been added too, for a better support.
-# * the marc_breeding and z3950* tables have been modified : they have an 
encoding column and the random z3950 number is stored too for convenience => 
it's the key I use to list only requested biblios in the popup.
-#
-# Revision 1.1  2002/11/22 10:15:22  tipaul
-# moving z3950 related scripts to specific dir
-#
-# Revision 1.3  2002/07/02 22:08:50  tonnesen
-# merging changes from rel-1-2
-#
-# Revision 1.1.2.3  2002/06/26 19:56:57  tonnesen
-# Bug fix.  Single quotes were causing $KohaZ3950Shell variable to not get
-# expanded
-#
-# Revision 1.1.2.2  2002/06/26 16:25:51  amillar
-# Make directory variable name more explanatory
-#

Index: z3950-daemon-shell.sh
===================================================================
RCS file: z3950-daemon-shell.sh
diff -N z3950-daemon-shell.sh
--- z3950-daemon-shell.sh       5 Nov 2003 23:33:45 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-# $Id: z3950-daemon-shell.sh,v 1.5 2003/11/05 23:33:45 slef Exp $
-
-# Script to start Koha background Z39.50 search daemon
-
-# Part of the Koha Library Mgmt System -  www.koha.org
-# Licensed under the GPL
-
-#----------------------------
-# Do NOT run this script directly from system startup-- this should not run as 
root
-#    Call  z3950-daemon-launch.sh  instead
-
-#----------------------------
-. $(dirname $0)/z3950-daemon-options
-
-#----------------------------
-LOGFILE=$LogDir/z3950-daemon-`date +%Y%m%d-%H%M`.log
-
-touch $LOGFILE
-if [ ! -w $LOGFILE ]
-then
-       echo ERROR: Cannot write to log file $LOGFILE
-       exit 1
-fi
-
-KohaZ3950Script=$KohaZ3950Dir/processz3950queue
-if [ ! -x $KohaZ3950Script ]
-then
-       echo ERROR: Cannot find Koha Z39.50 daemon script $KohaZ3950Script
-       exit 1
-fi
-
-PERL5LIB=$KohaModuleDir
-export PERL5LIB
-
-KOHA_CONF=$KohaConf
-export KOHA_CONF
-
-exec $KohaZ3950Script $LogDir >>$LOGFILE 2>&1
-
-#-------------------
-# $Log: z3950-daemon-shell.sh,v $
-# Revision 1.5  2003/11/05 23:33:45  slef
-# Now figures out what directory the scripts are in
-#
-# Revision 1.4  2003/10/20 19:16:50  slef
-# Work on install bugs (see bug 632)
-#
-# Revision 1.3  2003/10/06 09:10:39  slef
-# Removing config info from z3950*sh and using C4::Context in 
processz3950queue (Fixed bug 39)
-#
-# Revision 1.2  2003/04/29 16:48:25  tipaul
-# really proud of this commit :-)
-# z3950 search and import seems to works fine.
-# Let me explain how :
-# * a "search z3950" button is added in the addbiblio template.
-# * when clicked, a popup appears and z3950/search.pl is called
-# * z3950/search.pl calls addz3950search in the DB
-# * the z3950 daemon retrieve the records and stores them in z3950results AND 
in marc_breeding table.
-# * as long as there as searches pending, the popup auto refresh every 2 
seconds, and says how many searches are pending.
-# * when the user clicks on a z3950 result => the parent popup is called with 
the requested biblio, and auto-filled
-#
-# Note :
-# * character encoding support : (It's a nightmare...) In the z3950servers 
table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in 
this column. Depending on this, the char_decode in C4::Biblio.pm replaces 
marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import 
this value has been added too, for a better support.
-# * the marc_breeding and z3950* tables have been modified : they have an 
encoding column and the random z3950 number is stored too for convenience => 
it's the key I use to list only requested biblios in the popup.
-#
-# Revision 1.1  2002/11/22 10:15:22  tipaul
-# moving z3950 related scripts to specific dir
-#
-# Revision 1.3  2002/07/02 22:08:50  tonnesen
-# merging changes from rel-1-2
-#
-# Revision 1.1.2.3  2002/06/28 17:45:39  tonnesen
-# z3950queue now listens for a -HUP signal before processing the queue.  
Z3950.pm
-# sends the -HUP signal when queries are added to the queue.
-#
-# Revision 1.1.2.2  2002/06/26 16:25:51  amillar
-# Make directory variable name more explanatory
-#




reply via email to

[Prev in Thread] Current Thread [Next in Thread]