View | Details | Raw Unified | Return to bug 28639
Collapse All | Expand All

(-)a/Koha/OAI/Server/Repository.pm (+5 lines)
Lines 39-44 use C4::Context; Link Here
39
use C4::Biblio qw( GetFrameworkCode );
39
use C4::Biblio qw( GetFrameworkCode );
40
use Koha::XSLT::Base;
40
use Koha::XSLT::Base;
41
use Koha::Biblios;
41
use Koha::Biblios;
42
use Koha::Filter::MARC::EmbedSeeFromHeadings;
42
43
43
=head1 NAME
44
=head1 NAME
44
45
Lines 172-177 sub get_biblio_marcxml { Link Here
172
    my ( $self, $biblionumber, $format ) = @_;
173
    my ( $self, $biblionumber, $format ) = @_;
173
    my $with_items   = 0;
174
    my $with_items   = 0;
174
    my $expanded_avs = 0;
175
    my $expanded_avs = 0;
176
    my $embedseefromheadings = C4::Context->preference('OAI-PMH:EmbedSeeFromInBibRecord') || 0;
175
    if ( my $conf = $self->{conf} ) {
177
    if ( my $conf = $self->{conf} ) {
176
        $with_items   = $conf->{format}->{$format}->{include_items  };
178
        $with_items   = $conf->{format}->{$format}->{include_items  };
177
        $expanded_avs = $conf->{format}->{$format}->{expanded_avs};
179
        $expanded_avs = $conf->{format}->{$format}->{expanded_avs};
Lines 179-184 sub get_biblio_marcxml { Link Here
179
181
180
    my $biblio = Koha::Biblios->find($biblionumber);
182
    my $biblio = Koha::Biblios->find($biblionumber);
181
    my $record = $biblio->metadata->record({ embed_items => $with_items, opac => 1 });
183
    my $record = $biblio->metadata->record({ embed_items => $with_items, opac => 1 });
184
    if ( $embedseefromheadings ) {
185
        Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record);
186
    }
182
    if ( $expanded_avs ) {
187
    if ( $expanded_avs ) {
183
        my $frameworkcode = GetFrameworkCode($biblionumber) || '';
188
        my $frameworkcode = GetFrameworkCode($biblionumber) || '';
184
        my $record_processor = Koha::RecordProcessor->new(
189
        my $record_processor = Koha::RecordProcessor->new(
(-)a/installer/data/mysql/atomicupdate/bug_28639-add_EmbedSeeFromInBibRecord_syspref.pl (+21 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "bug_28639",
5
    description => "Add embed see-from headings for oai",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{
12
            INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
13
            VALUES (
14
                'EmbedSeeFromInBibRecord', '0', NULL, 'Add embed see-from headings for OAI', 'YesNo'
15
                )
16
            }
17
        );
18
19
        say $out "Syspref EmbedSeeFromInBibRecord for OAI";
20
    },
21
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 415-420 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
415
('OAI-PMH:AutoUpdateSetEmbedItemData', '0', '', 'Embed item information when automatically updating OAI sets. Requires OAI-PMH:AutoUpdateSets syspref to be enabled', 'YesNo'),
415
('OAI-PMH:AutoUpdateSetEmbedItemData', '0', '', 'Embed item information when automatically updating OAI sets. Requires OAI-PMH:AutoUpdateSets syspref to be enabled', 'YesNo'),
416
('OAI-PMH:ConfFile','',NULL,'If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.','File'),
416
('OAI-PMH:ConfFile','',NULL,'If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.','File'),
417
('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent), might be deleted (transient), or will never have any data in it (no)','transient|persistent|no','Choice'),
417
('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent), might be deleted (transient), or will never have any data in it (no)','transient|persistent|no','Choice'),
418
('OAI-PMH:EmbedSeeFromInBibRecord','0','','Embed see-from headings in bibliographic records exposed through OAI repository.','YesNo'),
418
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
419
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
419
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
420
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
420
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
421
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref (-1 / +6 lines)
Lines 80-85 Web services: Link Here
80
                  transient: might be emptied or truncated at some point (transient)
80
                  transient: might be emptied or truncated at some point (transient)
81
                  no: will never have any data in it (no)
81
                  no: will never have any data in it (no)
82
            - "."
82
            - "."
83
        -
84
            - pref: "OAI-PMH:EmbedSeeFromInBibRecord"
85
              choices:
86
                1: Enable
87
                0: "Don't enabled"
88
            - "Embed <em>see from</em> (non-preferred form) headings in bibliographic records exposed through OAI repository."
83
    ILS-DI:
89
    ILS-DI:
84
        -
90
        -
85
            - pref: ILS-DI
91
            - pref: ILS-DI
86
- 

Return to bug 28639