I couldn't verify on master yet, but tested on 20.11.05: When a record is suppressed in the catalog using 942$n=1 and OpacSuppression a direct link to the MARCdetail page will still work: /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=x This is problematic as some search bots could still index the records and someone clever would also be able to guess it. I think we need to add checks for suppression on these pages and redirect according to OpacSuppressionRedirect.
Arf indeed, code in only in opac-detail.pl : https://git.koha-community.org/Koha-community/Koha/src/commit/3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147 This needs to be in a module, and if possible with a Koha to MARC mapping instead of hardcoded 942$n.
(In reply to Fridolin Somers from comment #1) > Arf indeed, code in only in opac-detail.pl : > > https://git.koha-community.org/Koha-community/Koha/src/commit/ > 3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147 > > This needs to be in a module, and if possible with a Koha to MARC mapping > instead of hardcoded 942$n. I think adding a Koha to MARC mapping could be a different bug, also to keep this as easy as possible for backporting. Possibly the code for the check should also be in a routine somewhere? For MARC21 942$n has been established as standard and has a matching index. I am not sure if UNIMARC has a standard mapping at the moment?
(In reply to Katrin Fischer from comment #2) > (In reply to Fridolin Somers from comment #1) > > Arf indeed, code in only in opac-detail.pl : > > > > https://git.koha-community.org/Koha-community/Koha/src/commit/ > > 3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147 > > > > This needs to be in a module, and if possible with a Koha to MARC mapping > > instead of hardcoded 942$n. > > I think adding a Koha to MARC mapping could be a different bug, also to keep > this as easy as possible for backporting. > Sure.
Should we add to Koha::Biblio hidden_in_opac() ? Maybe with a param 'context' = 'search' or 'details' ?