Bug 7805 Followup for perlcritic messages
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 14 Jun 2012 10:40:08 +0000 (12:40 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 3 Sep 2012 13:57:13 +0000 (15:57 +0200)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by going to Lists and doubleclicking a list to see
its contents (in opac or staff). It works. No warnings
in the log. I am ready to sign off.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/VirtualShelves.pm

index 8ecb603..abe8b90 100644 (file)
@@ -221,7 +221,7 @@ Returns the above-mentioned fields for passed virtual shelf number.
 
 =cut
 
-sub GetShelf ($) {
+sub GetShelf {
     my ($shelfnumber) = @_;
     my $query = qq(
         SELECT shelfnumber, shelfname, owner, category, sortfield,
@@ -252,7 +252,7 @@ from C4::Circulation.
 
 =cut
 
-sub GetShelfContents ($;$$$) {
+sub GetShelfContents {
     my ($shelfnumber, $row_count, $offset, $sortfield) = @_;
     my $dbh=C4::Context->dbh();
     my $sth1 = $dbh->prepare("SELECT count(*) FROM virtualshelfcontents WHERE shelfnumber = ?");
@@ -351,7 +351,7 @@ sub AddToShelf {
     my $sth = $dbh->prepare($query);
 
     $sth->execute( $shelfnumber, $biblionumber );
-    ($sth->rows) and return undef; # already on shelf
+    ($sth->rows) and return; # already on shelf
     $query = qq(
         INSERT INTO virtualshelfcontents
             (shelfnumber, biblionumber, flags, borrowernumber)
@@ -658,15 +658,6 @@ sub _biblionumber_sth { #only used in obsolete sub below
     $sth;
 }
 
-sub each_biblionumbers (&$) { #OBSOLETE
-    my ($code,$shelf) = @_;
-    my $ref =  _biblionumber_sth($shelf)->fetchall_arrayref;
-    map {
-        $_=$$_[0];
-        $code->();
-        } @$ref;
-}
-
 sub _CheckShelfName {
     my ($name, $cat, $owner, $number)= @_;