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