Lines 174-204
my $marcflavour = C4::Context->preference("marcflavour");
Link Here
|
174 |
my $ean = GetNormalizedEAN( $record, $marcflavour ); |
174 |
my $ean = GetNormalizedEAN( $record, $marcflavour ); |
175 |
|
175 |
|
176 |
{ |
176 |
{ |
177 |
|
|
|
178 |
# XSLT processing of some stuff |
179 |
my $xslfile = C4::Context->preference('OPACXSLTDetailsDisplay') || "default"; |
180 |
my $lang = C4::Languages::getlanguage(); |
181 |
my $sysxml = C4::XSLT::get_xslt_sysprefs(); |
182 |
|
183 |
my $searcher = Koha::SearchEngine::Search->new( |
177 |
my $searcher = Koha::SearchEngine::Search->new( |
184 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } |
178 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } |
185 |
); |
179 |
); |
186 |
my $cleaned_title = $biblio->title; |
180 |
my $cleaned_title = $biblio->title; |
187 |
$cleaned_title =~ tr|/||; |
181 |
$cleaned_title =~ tr|/||; |
188 |
my $query = |
182 |
my $query = |
189 |
( C4::Context->preference('UseControlNumber') and $record->field('001') ) |
183 |
( C4::Context->preference('UseControlNumber') and $record->field('001') ) |
190 |
? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' |
184 |
? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' |
191 |
: "Host-item:$cleaned_title"; |
185 |
: "Host-item:$cleaned_title"; |
192 |
my ( $err, $result, $count ) = $searcher->simple_search_compat( $query, 0, 0 ); |
186 |
my ( $err, $result, $count ) = $searcher->simple_search_compat( $query, 0, 0 ); |
193 |
|
187 |
|
194 |
warn "Warning from simple_search_compat: $err" |
188 |
warn "Warning from simple_search_compat: $err" |
195 |
if $err; |
189 |
if $err; |
196 |
|
190 |
|
197 |
my $variables = { |
191 |
my $variables = { |
198 |
anonymous_session => ($borrowernumber) ? 0 : 1, |
192 |
anonymous_session => ($borrowernumber) ? 0 : 1, |
199 |
show_analytics_link => $count > 0 ? 1 : 0 |
193 |
show_analytics_link => $count > 0 ? 1 : 0 |
200 |
}; |
194 |
}; |
201 |
|
195 |
|
|
|
196 |
my $lang = C4::Languages::getlanguage(); |
202 |
my @plugin_responses = Koha::Plugins->call( |
197 |
my @plugin_responses = Koha::Plugins->call( |
203 |
'opac_detail_xslt_variables', |
198 |
'opac_detail_xslt_variables', |
204 |
{ |
199 |
{ |
Lines 214-222
my $ean = GetNormalizedEAN( $record, $marcflavour );
Link Here
|
214 |
|
209 |
|
215 |
$template->param( |
210 |
$template->param( |
216 |
XSLTBloc => XSLTParse4Display( |
211 |
XSLTBloc => XSLTParse4Display( |
217 |
$biblionumber, $record, "OPACXSLTDetailsDisplay", 1, undef, |
212 |
{ |
218 |
$sysxml, $xslfile, $lang, $variables |
213 |
biblionumber => $biblionumber, |
219 |
) |
214 |
record => $record, |
|
|
215 |
xsl_syspref => 'OPACXSLTDetailsDisplay', |
216 |
fix_amps => 1, |
217 |
xslt_variables => $variables |
218 |
} |
219 |
), |
220 |
); |
220 |
); |
221 |
} |
221 |
} |
222 |
|
222 |
|