|
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 |
|