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

(-)a/C4/Search.pm (-1 / +1 lines)
Lines 2222-2228 sub searchResults { Link Here
2222
        # XSLT processing of some stuff
2222
        # XSLT processing of some stuff
2223
        # we fetched the sysprefs already before the loop through all retrieved record!
2223
        # we fetched the sysprefs already before the loop through all retrieved record!
2224
        if (!$scan && $xslfile) {
2224
        if (!$scan && $xslfile) {
2225
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang);
2225
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $interface);
2226
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2226
        # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2227
        }
2227
        }
2228
2228
(-)a/C4/XSLT.pm (-1 / +14 lines)
Lines 32-37 use C4::Reserves; Link Here
32
use Koha::AuthorisedValues;
32
use Koha::AuthorisedValues;
33
use Koha::XSLT_Handler;
33
use Koha::XSLT_Handler;
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::RecordProcessor;
35
36
36
use Encode;
37
use Encode;
37
38
Lines 187-197 sub get_xslt_sysprefs { Link Here
187
}
188
}
188
189
189
sub XSLTParse4Display {
190
sub XSLTParse4Display {
190
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_;
191
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $interface ) = @_;
191
192
192
    $sysxml ||= C4::Context->preference($xslsyspref);
193
    $sysxml ||= C4::Context->preference($xslsyspref);
193
    $xslfilename ||= C4::Context->preference($xslsyspref);
194
    $xslfilename ||= C4::Context->preference($xslsyspref);
194
    $lang ||= C4::Languages::getlanguage();
195
    $lang ||= C4::Languages::getlanguage();
196
    $interface ||= 'opac';
195
197
196
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
198
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
197
        my $htdocs;
199
        my $htdocs;
Lines 239-244 sub XSLTParse4Display { Link Here
239
241
240
    # grab the XML, run it through our stylesheet, push it out to the browser
242
    # grab the XML, run it through our stylesheet, push it out to the browser
241
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
243
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
244
245
    my $framework = C4::Biblio::GetFrameworkCode( $biblionumber );
246
    my $record_processor = Koha::RecordProcessor->new({
247
        filters => 'ViewPolicy',
248
        options => {
249
            interface => $interface,
250
            frameworkcode => $framework
251
        }
252
    });
253
    $record_processor->process($record);
254
242
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
255
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
243
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
256
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
244
257
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 94-100 if ( $xslfile ) { Link Here
94
        XSLTDetailsDisplay => '1',
94
        XSLTDetailsDisplay => '1',
95
        XSLTBloc => XSLTParse4Display(
95
        XSLTBloc => XSLTParse4Display(
96
                        $biblionumber, $record, "XSLTDetailsDisplay",
96
                        $biblionumber, $record, "XSLTDetailsDisplay",
97
                        1, undef, $sysxml, $xslfile, $lang
97
                        1, undef, $sysxml, $xslfile, $lang, 'intranet'
98
                    )
98
                    )
99
    );
99
    );
100
}
100
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 347-353 function verify_images() { Link Here
347
  [% IF ( unknownbiblionumber ) %]
347
  [% IF ( unknownbiblionumber ) %]
348
    Unknown record
348
    Unknown record
349
  [% ELSE %]
349
  [% ELSE %]
350
    Details for <i>[% title |html %]  [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</i>
350
/    Details for <i>[% title |html %]  [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</i>
351
  [% END %]
351
  [% END %]
352
</div>
352
</div>
353
353
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 157-163 if ( $xslfile ) { Link Here
157
    $template->param(
157
    $template->param(
158
        XSLTBloc => XSLTParse4Display(
158
        XSLTBloc => XSLTParse4Display(
159
                        $biblionumber, $record, "OPACXSLTDetailsDisplay",
159
                        $biblionumber, $record, "OPACXSLTDetailsDisplay",
160
                        1, undef, $sysxml, $xslfile, $lang
160
                        1, undef, $sysxml, $xslfile, $lang, 'opac'
161
                    )
161
                    )
162
    );
162
    );
163
}
163
}
(-)a/opac/opac-shelves.pl (-1 / +1 lines)
Lines 272-278 if ( $op eq 'view' ) { Link Here
272
272
273
                if ( $xslfile ) {
273
                if ( $xslfile ) {
274
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTListsDisplay",
274
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTListsDisplay",
275
                                                                1, undef, $sysxml, $xslfile, $lang);
275
                                                                1, undef, $sysxml, $xslfile, $lang, 'opac');
276
                }
276
                }
277
277
278
                my $marcflavour = C4::Context->preference("marcflavour");
278
                my $marcflavour = C4::Context->preference("marcflavour");
(-)a/opac/opac-tags.pl (-1 / +1 lines)
Lines 242-248 if ($loggedinuser) { Link Here
242
        if ( $xslfile ) {
242
        if ( $xslfile ) {
243
            $tag->{XSLTBloc} = XSLTParse4Display(
243
            $tag->{XSLTBloc} = XSLTParse4Display(
244
                    $tag->{ biblionumber }, $record, "OPACXSLTResultsDisplay",
244
                    $tag->{ biblionumber }, $record, "OPACXSLTResultsDisplay",
245
                    1, undef, $sysxml, $xslfile, $lang
245
                    1, undef, $sysxml, $xslfile, $lang, 'opac'
246
            );
246
            );
247
        }
247
        }
248
248
(-)a/virtualshelves/shelves.pl (-2 / +1 lines)
Lines 230-236 if ( $op eq 'view' ) { Link Here
230
230
231
                if ( $xslfile ) {
231
                if ( $xslfile ) {
232
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay",
232
                    $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay",
233
                                                                1, undef, $sysxml, $xslfile, $lang);
233
                                                                1, undef, $sysxml, $xslfile, $lang, 'intranet');
234
                }
234
                }
235
235
236
                my $marcflavour = C4::Context->preference("marcflavour");
236
                my $marcflavour = C4::Context->preference("marcflavour");
237
- 

Return to bug 17527