Bugzilla – Attachment 188550 Details for
Bug 26537
Search does not work when no term in value_builder/unimarc_field_4XX.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26537: (follow-up) Fix vars and tidiness
Bug-26537-follow-up-Fix-vars-and-tidiness.patch (text/plain), 2.82 KB, created by
Thibaud Guillot (thibaud_g)
on 2025-10-29 14:04:47 UTC
(
hide
)
Description:
Bug 26537: (follow-up) Fix vars and tidiness
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2025-10-29 14:04:47 UTC
Size:
2.82 KB
patch
obsolete
>From 244222766cc2208c2ca697abb01b41025ca24853 Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Wed, 29 Oct 2025 15:03:37 +0100 >Subject: [PATCH] Bug 26537: (follow-up) Fix vars and tidiness > >--- > cataloguing/value_builder/unimarc_field_4XX.pl | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index 16e1ed922ce..4c549b90d6d 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -326,12 +326,12 @@ sub plugin { > my $orderby; > my $op = 'AND'; > $search = 'kw:' . $search . " $op mc-itemtype:" . $itype if $itype; >- my $limits = $itype ? ["mc-itype,phr:$itype"] : []; >- my $builder = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); >+ my $limits = $itype ? ["mc-itype,phr:$itype"] : []; >+ my $builder = Koha::SearchEngine::QueryBuilder->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); > my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >- my ($builderror, $search)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']); >+ my ( $builderror, $query_search ) = $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance'] ); > my ( $errors, $results, $total_hits ) = >- $searcher->simple_search_compat( $search, $startfrom * $resultsperpage, $resultsperpage ); >+ $searcher->simple_search_compat( $query_search, $startfrom * $resultsperpage, $resultsperpage ); > > if ( defined $errors ) { > $results = []; >@@ -356,7 +356,7 @@ sub plugin { > $displaynext = 1; > } > my @arrayresults; >- my @field_data = ($search); >+ my @field_data = ($query_search); > for ( my $i = 0 ; $i < $total && $i < $resultsperpage ; $i++ ) { > my $record = C4::Search::new_record_from_zebra( 'biblioserver', $results->[$i] ); > next unless $record; >@@ -421,7 +421,7 @@ sub plugin { > if ( $total_hits < $from + $resultsperpage ) { > $to = $total_hits; > } else { >- $to = $from * $resultsperpage ; >+ $to = $from * $resultsperpage; > } > > # my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search"; >@@ -451,7 +451,7 @@ sub plugin { > from => $from, > to => $to, > numbers => \@numbers, >- search => $search, >+ search => $query_search, > Search => 0 > ); > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26537
:
110756
|
111049
|
128930
|
128931
|
128932
|
128933
|
128934
|
128937
|
128938
|
129607
|
129646
|
129647
|
144858
|
144859
|
186010
|
186011
| 188550