opac-detail.pl - cleanup incl. exit after redirect
authorJoe Atzberger <joe.atzberger@liblime.com>
Wed, 2 Jan 2008 19:18:47 +0000 (13:18 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 3 Jan 2008 07:18:13 +0000 (01:18 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
opac/opac-detail.pl

index 92628be..bb4f146 100755 (executable)
@@ -53,6 +53,7 @@ my $dat = &GetBiblioData($biblionumber);
 
 if (!$dat) {
     print $query->redirect("/cgi-bin/koha/koha-tmpl/errors/404.pl");
+       exit;
 }
 
 #coping with subscriptions
@@ -84,7 +85,7 @@ my $norequests = 1;
 foreach my $itm (@items) {
      $norequests = 0 && $norequests
        if ( (not $itm->{'wthdrawn'} )
-          || (not $itm->{'itemlost'} )
+         || (not $itm->{'itemlost'} )
          || (not $itm->{'itemnotforloan'} )
          || ($itm->{'itemnumber'} ) );
         $itm->{ $itm->{'publictype'} } = 1;
@@ -113,7 +114,6 @@ $template->param( norequests => $norequests, RequestOnOpac=>$RequestOnOpac );
                MARCURLS        => $marcurlsarray,
     );
 
-my @results = ( $dat, );
 foreach ( keys %{$dat} ) {
     $template->param( "$_" => $dat->{$_} . "" );
 }