Koha-clms/Koha/OAI/Server
David Cook 70ff8dd1b4
Bug 37713: Do not show record metadata if OPAC suppressed
This change checks the 942$n if OpacSuppression is enabled,
and does not return the record metadata if 942$n is true. See BZ 31161.

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Enable syspref "OAI-PMH"
3. Set syspref "OpacSuppression" to "Hide"
4. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc
5. Note KOHA-OAI-TEST:2 metadata visible
6. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2
7. Set 942$n to "Yes"
8. Go to http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc
9. Note KOHA-OAI-TEST:2 metadata no longer visible and instead "Record Status: deleted" shows

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-17 09:18:03 -06:00
..
DeletedRecord.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Description.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
GetRecord.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Identify.pm Bug 40989: Fix OAI-PMH tests for CGI.pm 4.68+ 2025-12-17 13:24:33 -07:00
ListBase.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ListIdentifiers.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ListMetadataFormats.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ListRecords.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ListSets.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Record.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Repository.pm Bug 37713: Do not show record metadata if OPAC suppressed 2026-04-17 09:18:03 -06:00
ResumptionToken.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00