From 4d88a095097c4325f647b8136b681cac9aaa7cba Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Wed, 19 Feb 2003 01:01:06 +0000 Subject: [PATCH] Removed the unecessary $dbh argument from being passed. Resolved a few minor FIXMEs. --- C4/Z3950.pm | 37 +++++++++++++++++++------------------ acqui.simple/marcimport.pl | 6 +++++- z3950/z3950import.pl | 8 ++++++-- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/C4/Z3950.pm b/C4/Z3950.pm index d91e558536..6185d9fb68 100755 --- a/C4/Z3950.pm +++ b/C4/Z3950.pm @@ -85,10 +85,10 @@ C<$dbh> is ignored. =cut #' + sub z3950servername { # inputs my ( - $dbh, # FIXME - Unused argument $srvid, # server id number $default, )=@_; @@ -98,17 +98,18 @@ sub z3950servername { $dbh = C4::Context->dbh; - # FIXME - Fix indentation - my $sti=$dbh->prepare("select name - from z3950servers - where id=?"); - $sti->execute($srvid); - if ( ! $sti->err ) { - ($longname)=$sti->fetchrow; - } - if (! $longname) { - $longname="$default"; - } + my $sti=$dbh->prepare(" + select name + from z3950servers + where id=?"); + + $sti->execute($srvid); + if ( ! $sti->err ) { + ($longname)=$sti->fetchrow; + } + if (! $longname) { + $longname="$default"; + } return $longname; } # sub z3950servername @@ -150,8 +151,6 @@ sub addz3950queue { use strict; # input my ( - $dbh, # DBI handle - # FIXME - Unused argument $query, # value to look up $type, # type of value ("isbn", "lccn", etc). # FIXME - What other values are legal? @@ -204,10 +203,8 @@ sub addz3950queue { } my $serverlist=''; - # FIXME - $serverlist = join(" ", @serverlist); - foreach (@serverlist) { - $serverlist.="$_ "; - } # foreach + + $severlist = join(" ", @serverlist); chop $serverlist; # FIXME - Is this test supposed to test whether @serverlist is @@ -274,6 +271,10 @@ Koha Developement team #-------------------------------------- # $Log$ +# Revision 1.7 2003/02/19 01:01:06 wolfpac444 +# Removed the unecessary $dbh argument from being passed. +# Resolved a few minor FIXMEs. +# # Revision 1.6 2002/10/13 08:30:53 arensb # Deleted unused variables. # Removed trailing whitespace. diff --git a/acqui.simple/marcimport.pl b/acqui.simple/marcimport.pl index 34930ef0b8..5c5e5eee6f 100755 --- a/acqui.simple/marcimport.pl +++ b/acqui.simple/marcimport.pl @@ -313,7 +313,7 @@ sub ListFileRecords { $startdate,$enddate,$serverstring) = $sth->fetchrow ) { my ($srvid, $server, $database, $auth) = split(/\//, $serverstring, 4); if ( $server ) { - my $srvname=&z3950servername($dbh,$srvid,"$server/$database"); + my $srvname=&z3950servername($srvid,"$server/$database"); $template->param(srvid => $srvid); $template->param(srvname => $srvname); } # if $server @@ -806,6 +806,10 @@ sub FormatMarcText { #--------------- # log cleared, as marcimport is (almost) rewritten from scratch. # $Log$ +# Revision 1.31 2003/02/19 01:01:07 wolfpac444 +# Removed the unecessary $dbh argument from being passed. +# Resolved a few minor FIXMEs. +# # Revision 1.30 2003/02/02 07:18:38 acli # Moved C4/Charset.pm to C4/Interface/CGI/Output.pm # diff --git a/z3950/z3950import.pl b/z3950/z3950import.pl index 3cbe20a24e..10c45f072d 100644 --- a/z3950/z3950import.pl +++ b/z3950/z3950import.pl @@ -281,7 +281,7 @@ sub ListFileRecords { $startdate,$enddate,$serverstring) = $sth->fetchrow ) { my ($srvid, $server, $database, $auth) = split(/\//, $serverstring, 4); if ( $server ) { - my $srvname=&z3950servername($dbh,$srvid,"$server/$database"); + my $srvname=&z3950servername($srvid,"$server/$database"); $template->param(srvid => $srvid); $template->param(srvname => $srvname); } # if $server @@ -651,7 +651,7 @@ sub AcceptZ3950Queue { } } - $error=addz3950queue($dbh,$input->param('query'), $input->param('type'), + $error=addz3950queue($input->param('query'), $input->param('type'), $input->param('rand'), @serverlist); if ( $error ) { print qq| @@ -996,6 +996,10 @@ sub FormatMarcText { #--------------- # $Log$ +# Revision 1.2 2003/02/19 01:01:11 wolfpac444 +# Removed the unecessary $dbh argument from being passed. +# Resolved a few minor FIXMEs. +# # Revision 1.1 2002/11/22 10:15:22 tipaul # moving z3950 related scripts to specific dir # -- 2.39.5