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

(-)a/Koha/OAI/Server/Repository.pm (-1 / +7 lines)
Lines 136-142 sub new { Link Here
136
    }
136
    }
137
137
138
    $response->set_handler( XML::SAX::Writer->new( Output => *STDOUT ) );
138
    $response->set_handler( XML::SAX::Writer->new( Output => *STDOUT ) );
139
    $response->xslt( "/opac-tmpl/xslt/OAI.xslt" );
139
140
    my $stylesheet = C4::Context->preference('OAI-PMH:CustomStylesheet');
141
    if ( !$stylesheet ) {
142
        # fallback to shipped xslt
143
        $stylesheet = '/opac-tmpl/xslt/OAI.xslt';
144
    }
145
    $response->xslt( $stylesheet );
140
    $response->generate;
146
    $response->generate;
141
147
142
    bless $self, $class;
148
    bless $self, $class;
(-)a/installer/data/mysql/atomicupdate/bug_15527_oai_stylesheets.sql (+12 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
2
VALUES('OAI-PMH:CustomStylesheet',NULL,'Use a custom stylesheet instead of the default stylesheet for the OAI-PMH server. Leave the field blank to use the default.',NULL,'free');
3
4
-- $DBversion = "3.23.00.XXX";
5
-- if(CheckVersion($DBversion)) {
6
--     $dbh->do(q{
7
--         INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
8
--         VALUES('OAI-PMH:CustomStylesheet',NULL,'Use a custom stylesheet instead of the default stylesheet for the OAI-PMH server. Leave the field blank to use the default.',NULL,'free')
9
--     });
10
--     print "Upgrade to $DBversion done (Bug 15527: Add a stylesheet for OAI-PMH to aid usability)\n";
11
--     SetVersion($DBversion);
12
-- }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 255-260 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
255
('OAI-PMH:ConfFile','',NULL,'If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.','File'),
255
('OAI-PMH:ConfFile','',NULL,'If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode.','File'),
256
('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'),
256
('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'),
257
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
257
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
258
('OAI-PMH:CustomStylesheet',NULL,NULL,'Use a custom stylesheet instead of the default stylesheet for the OAI-PMH server. Leave the field blank to use the default.','free'),
258
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
259
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
259
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
260
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
260
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
261
('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 / +4 lines)
Lines 28-33 Web services: Link Here
28
                  no: Disable
28
                  no: Disable
29
            - automatic update of OAI-PMH sets when a bibliographic record is created or updated
29
            - automatic update of OAI-PMH sets when a bibliographic record is created or updated
30
        -
30
        -
31
            - Use
32
            - pref: "OAI-PMH:CustomStylesheet"
33
            - instead of the default stylesheet for the OAI-PMH server. Leave the field blank to use the default.
34
        -
31
            - Koha's deletedbiblio table
35
            - Koha's deletedbiblio table
32
            - pref: "OAI-PMH:DeletedRecord"
36
            - pref: "OAI-PMH:DeletedRecord"
33
              choices:
37
              choices:
34
- 

Return to bug 15527