X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FZ3950.pm;h=8f97d8bd6f4aadbb712b4ce5daefbbaa7ef9c4b0;hb=f24750f5ba1a2b6535c76755c5daf27ca260fa0f;hp=6ea1f898578cac96fa6c2acc0934559ae515bc31;hpb=2ffd5b7228f4e638583162d483e1dd2febeafe1b;p=koha.git diff --git a/C4/Z3950.pm b/C4/Z3950.pm old mode 100755 new mode 100644 index 6ea1f89857..8f97d8bd6f --- a/C4/Z3950.pm +++ b/C4/Z3950.pm @@ -1,6 +1,5 @@ package C4::Z3950; -# $Id$ # Routines for handling Z39.50 lookups @@ -8,7 +7,6 @@ package C4::Z3950; # Licensed under the GPL - # Copyright 2000-2002 Katipo Communications # # This file is part of Koha. @@ -22,11 +20,12 @@ package C4::Z3950; # 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 +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; +#use warnings; FIXME - Bug 2505 # standard or CPAN modules used use DBI; @@ -35,14 +34,20 @@ use DBI; use C4::Input; use C4::Biblio; -#------------------ - -require Exporter; - use vars qw($VERSION @ISA @EXPORT); -# set the version for version checking -$VERSION = do { my @v = '$Revision$' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); }; +BEGIN { + # set the version for version checking + $VERSION = 3.01; + require Exporter; + @ISA = qw(Exporter); + @EXPORT = qw( + &getz3950servers + &z3950servername + &addz3950queue + &checkz3950searchdone + ); +} =head1 NAME @@ -61,17 +66,6 @@ entering Z39.50 lookup requests. =over 2 -=cut - -@ISA = qw(Exporter); -@EXPORT = qw( - &getz3950servers - &z3950servername - &addz3950queue - &checkz3950searchdone -); - -#------------------------------------------------ =item getz3950servers @servers= &getz3950servers(checked); @@ -82,6 +76,7 @@ C<$checked> should always be true (1) => returns only active servers. If 0 => returns all servers =cut + sub getz3950servers { my ($checked) = @_; my $dbh = C4::Context->dbh; @@ -110,6 +105,7 @@ C<$server_id> is the Z39.50 server ID to look up. C<$dbh> is ignored. =cut + #' sub z3950servername { @@ -165,6 +161,7 @@ C<&addz3950queue> returns an error message. If it was successful, the error message is the empty string. =cut + #' sub addz3950queue { use strict; @@ -275,6 +272,7 @@ Returns the number of pending z3950 requests C<$random> is the random z3950 query number. =cut + sub checkz3950searchdone { my ($z3950random) = @_; my $dbh = C4::Context->dbh; @@ -299,12 +297,11 @@ __END__ =head1 AUTHOR -Koha Developement team +Koha Development Team =cut #-------------------------------------- -# $Log$ # Revision 1.14 2007/03/09 14:31:47 tipaul # rel_3_0 moved to HEAD # @@ -321,13 +318,13 @@ Koha Developement team # * 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. +# * the z3950 daemon retrieve the records and stores them in import_batches/import_records/import_biblios tables. # * 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. +# * the mport_records 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.8 2003/04/29 08:09:45 tipaul # z3950 support is coming...