From 048d545d11921477e038be47ba89c128800a48de Mon Sep 17 00:00:00 2001 From: arensb Date: Tue, 1 Oct 2002 11:48:51 +0000 Subject: [PATCH] Added some FIXME comments, mostly marking duplicate functions. --- C4/Biblio.pm | 17 +++++++++++++++++ C4/Catalogue.pm | 4 +++- C4/Circulation.pm | 6 ++++++ C4/Circulation/Circ2.pm | 2 +- C4/Circulation/Main.pm | 5 +++++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 4189aa99b4..dce6212612 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1,6 +1,9 @@ package C4::Biblio; # $Id$ # $Log$ +# Revision 1.12 2002/10/01 11:48:51 arensb +# Added some FIXME comments, mostly marking duplicate functions. +# # Revision 1.11 2002/09/24 13:49:26 tipaul # long WAS the road to 1.3.0... # coming VERY SOON NOW... @@ -1426,6 +1429,8 @@ sub OLDmoditem { # $dbh->disconnect; } +# FIXME - A nearly-identical function, &delitem, appears in +# C4::Acquisitions sub OLDdelitem{ my ($dbh,$itemnum)=@_; # my $dbh=C4Connect; @@ -1527,6 +1532,8 @@ sub OLDdelbiblio{ # # +# FIXME - This is the same as &C4::Acquisitions::itemcount, but not +# the same as &C4::Search::itemcount sub itemcount{ my ($biblio)=@_; my $dbh=C4Connect; @@ -1556,6 +1563,8 @@ sub getorder{ return ($order,$ordnum->{'ordernumber'}); } +# FIXME - This is practically the same function as +# &C4::Acquisitions::getsingleorder and &C4::Catalogue::getsingleorder sub getsingleorder { my ($ordnum)=@_; my $dbh=C4Connect; @@ -1597,6 +1606,8 @@ sub modsubtitle { } # sub modsubtitle +# FIXME - This is functionally identical to +# &C4::Acquisitions::modaddauthor sub modaddauthor { my ($bibnum, $author) = @_; my $dbh = C4Connect; @@ -1628,6 +1639,8 @@ sub modnote { $dbh->disconnect; } +# FIXME - This is quite similar in effect to &C4::newbiblioitem, +# except for the MARC stuff. sub newbiblioitem { my ($biblioitem) = @_; my $dbh = C4Connect; @@ -1646,6 +1659,8 @@ sub newsubject { $dbh->disconnect; } +# FIXME - This is just a wrapper around &OLDnewsubtitle +# FIXME - This is in effect the same as &C4::Acquisitions::newsubtitle sub newsubtitle { my ($bibnum, $subtitle) = @_; my $dbh = C4Connect; @@ -1717,6 +1732,8 @@ sub countitems{ return($data->{'count(*)'}); } +# FIXME - This is just a wrapper around &OLDdelitem, and acts +# identically to &C4::Acquisitions::delitem sub delitem{ my ($itemnum)=@_; my $dbh=C4Connect; diff --git a/C4/Catalogue.pm b/C4/Catalogue.pm index 3d8a0f76f9..87f116edef 100644 --- a/C4/Catalogue.pm +++ b/C4/Catalogue.pm @@ -306,6 +306,7 @@ table are also updated to the new book fund ID. =cut #' +# FIXME - This function appears in C4::Acquisitions sub modorder { my ($title,$ordnum,$quantity,$listprice,$bibnum,$basketno,$supplier,$who,$notes,$bookfund,$bibitemnum,$rrp,$ecost,$gst,$budget,$cost,$invoice)=@_; my $dbh=C4Connect; @@ -884,7 +885,8 @@ sub updatecurrencies { $dbh->disconnect; } -# FIXME - Never used +# FIXME - Identical to &C4::Acquisitions::updatecost. Neither one is +# used sub updatecost{ my($price,$rrp,$itemnum)=@_; my $dbh=C4Connect; diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 37f18ea9c7..20bec16a56 100755 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -78,6 +78,9 @@ sub Start_circ{ &endint($env) } +# Not exported. +# FIXME - This is not the same as &C4::Circulation::Main::pastitems, +# though the two appear to share some code. sub pastitems{ #Get list of all items borrower has currently on issue my ($env,$bornum,$dbh)=@_; @@ -120,6 +123,7 @@ sub checkoverdues{ $sth->finish; } +# FIXME - This is quite similar to &C4::Circulation::Main::previousissue sub previousissue { my ($env,$itemnum,$dbh,$bornum)=@_; my $sth=$dbh->prepare("Select firstname,surname,issues.borrowernumber,cardnumber,returndate @@ -189,6 +193,7 @@ sub checkwaiting{ $sth->finish; } +# FIXME - This is identical to &C4::Circulation/Main::scanbook sub scanbook { my ($env,$interface)=@_; #scan barcode @@ -197,6 +202,7 @@ sub scanbook { return ($number,$reason); } +# FIXME - This is very similar to &C4::Circulation::Main::scanborrower sub scanborrower { my ($env,$interface)=@_; #scan barcode diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index d06d89a6a8..52215869b0 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -944,7 +944,7 @@ sub checkwaiting { return ($cnt,\@itemswaiting); } - +# FIXME - This is nearly-identical to &C4::Accounts::checkaccount sub checkaccount { # Stolen from Accounts.pm #take borrower number diff --git a/C4/Circulation/Main.pm b/C4/Circulation/Main.pm index 0d08cf11cd..70af7029a9 100755 --- a/C4/Circulation/Main.pm +++ b/C4/Circulation/Main.pm @@ -125,6 +125,8 @@ sub getprinter { $dbh->disconnect; } +# FIXME - This is not the same as &C4::Circulation::pastitems, though +# the two appear to share some code. sub pastitems{ #Get list of all items borrower has currently on issue my ($env,$bornum,$dbh)=@_; @@ -161,6 +163,7 @@ sub checkoverdues{ return $data->{'count(*)'}; } +# FIXME - This is quite similar to &C4::Circulation::previousissue sub previousissue { my ($env,$itemnum,$dbh,$bornum)=@_; my $sth=$dbh->prepare("Select @@ -274,6 +277,7 @@ sub checkwaiting{ return ($cnt,\@itemswaiting); } +# FIXME - This is identical to &C4::Circulation::scanbook sub scanbook { my ($env,$interface)=@_; #scan barcode @@ -282,6 +286,7 @@ sub scanbook { return ($number,$reason); } +# FIXME - This is very similar to &C4::Circulation::scanborrower sub scanborrower { my ($env,$interface)=@_; #scan barcode -- 2.39.5