Lines 180-202
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
Link Here
|
180 |
|
180 |
|
181 |
if ( $xslfile ) { |
181 |
if ( $xslfile ) { |
182 |
|
182 |
|
183 |
my $searcher = Koha::SearchEngine::Search->new( |
183 |
my $analytics_count = 0; |
184 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } |
184 |
eval { |
185 |
); |
185 |
my $searcher = Koha::SearchEngine::Search->new( |
186 |
my $cleaned_title = $biblio->title; |
186 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } |
187 |
$cleaned_title =~ tr|/||; |
187 |
); |
188 |
my $query = |
188 |
my $cleaned_title = $biblio->title; |
189 |
( C4::Context->preference('UseControlNumber') and $record->field('001') ) |
189 |
$cleaned_title =~ tr|/||; |
190 |
? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' |
190 |
my $query = |
191 |
: "Host-item:($cleaned_title)"; |
191 |
( C4::Context->preference('UseControlNumber') and $record->field('001') ) |
192 |
my ( $err, $result, $count ) = $searcher->simple_search_compat( $query, 0, 0 ); |
192 |
? 'rcn:'. $record->field('001')->data . ' AND (bib-level:a OR bib-level:b)' |
193 |
|
193 |
: "Host-item:($cleaned_title)"; |
194 |
warn "Warning from simple_search_compat: $err" |
194 |
my ( $err, $result, $analytics_count ) = $searcher->simple_search_compat( $query, 0, 0 ); |
195 |
if $err; |
195 |
warn "Warning from simple_search_compat: $err" if $err; |
|
|
196 |
}; |
196 |
|
197 |
|
197 |
my $variables = { |
198 |
my $variables = { |
198 |
anonymous_session => ($borrowernumber) ? 0 : 1, |
199 |
anonymous_session => ($borrowernumber) ? 0 : 1, |
199 |
show_analytics_link => $count > 0 ? 1 : 0 |
200 |
show_analytics_link => $analytics_count > 0 ? 1 : 0 |
200 |
}; |
201 |
}; |
201 |
|
202 |
|
202 |
my @plugin_responses = Koha::Plugins->call( |
203 |
my @plugin_responses = Koha::Plugins->call( |
203 |
- |
|
|