| 
      
            Lines 33-39
          use C4::Koha        qw(
      
      
        Link Here
      
     | 
  
        
          | 33 | 
          );  | 
          33 | 
          );  | 
        
        
          | 34 | 
          use C4::Search  qw( new_record_from_zebra searchResults getRecords );  | 
          34 | 
          use C4::Search  qw( new_record_from_zebra searchResults getRecords );  | 
        
        
          | 35 | 
          use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );  | 
          35 | 
          use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );  | 
        
          
            
              | 36 | 
              use C4::Output  qw( parametrized_url output_html_with_http_headers );  | 
              36 | 
              use C4::Output  qw( parametrized_url output_html_with_http_headers redirect_if_opac_suppressed );  | 
            
        
          | 37 | 
          use C4::Biblio  qw(  | 
          37 | 
          use C4::Biblio  qw(  | 
        
        
          | 38 | 
              CountItemsIssued  | 
          38 | 
              CountItemsIssued  | 
        
        
          | 39 | 
              GetBiblioData  | 
          39 | 
              GetBiblioData  | 
        
  
    | 
      
            Lines 112-142
          unless ( $biblio && $record ) {
      
      
        Link Here
      
     | 
  
        
          | 112 | 
          }  | 
          112 | 
          }  | 
        
        
          | 113 | 
           | 
          113 | 
           | 
        
        
          | 114 | 
          # If record should be suppressed, handle it early  | 
          114 | 
          # If record should be suppressed, handle it early  | 
        
          
            
              | 115 | 
              if ( C4::Context->preference('OpacSuppression') ) { | 
              115 | 
              redirect_if_opac_suppressed( $query, $biblio )  | 
            
            
              | 116 | 
               | 
              116 | 
                  if C4::Context->preference('OpacSuppression'); | 
            
            
              | 117 | 
                  # redirect to opac-blocked info page or 404?  | 
               | 
               | 
            
            
              | 118 | 
                  my $redirect_url;  | 
            
            
              | 119 | 
                  if ( C4::Context->preference("OpacSuppressionRedirect") ) { | 
            
            
              | 120 | 
                      $redirect_url = "/cgi-bin/koha/opac-blocked.pl";  | 
            
            
              | 121 | 
                  } else { | 
            
            
              | 122 | 
                      $redirect_url = "/cgi-bin/koha/errors/404.pl";  | 
            
            
              | 123 | 
                  }  | 
            
            
              | 124 | 
                  if ( $biblio->opac_suppressed() ) { | 
            
            
              | 125 | 
               | 
            
            
              | 126 | 
                      # if OPAC suppression by IP address  | 
            
            
              | 127 | 
                      if ( C4::Context->preference('OpacSuppressionByIPRange') ) { | 
            
            
              | 128 | 
                          my $IPAddress = $ENV{'REMOTE_ADDR'}; | 
            
            
              | 129 | 
                          my $IPRange   = C4::Context->preference('OpacSuppressionByIPRange'); | 
            
            
              | 130 | 
                          if ( $IPAddress !~ /^$IPRange/ ) { | 
            
            
              | 131 | 
                              print $query->redirect($redirect_url);  | 
            
            
              | 132 | 
                              exit;  | 
            
            
              | 133 | 
                          }  | 
            
            
              | 134 | 
                      } else { | 
            
            
              | 135 | 
                          print $query->redirect($redirect_url);  | 
            
            
              | 136 | 
                          exit;  | 
            
            
              | 137 | 
                      }  | 
            
            
              | 138 | 
                  }  | 
            
            
              | 139 | 
              }  | 
            
        
          | 140 | 
           | 
          117 | 
           | 
        
        
          | 141 | 
          my $metadata_extractor = $biblio->metadata_extractor;  | 
          118 | 
          my $metadata_extractor = $biblio->metadata_extractor;  | 
        
        
          | 142 | 
           | 
          119 | 
           | 
        
            
              | 143 | 
              -   | 
               | 
               |