Bugzilla – Attachment 52869 Details for
Bug 16746
Can not find duplicated authorities cataloguing a new one
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16746: Proposed start of counter-patch
Bug-16746-Proposed-start-of-counter-patch.patch (text/plain), 2.57 KB, created by
Mark Tompsett
on 2016-06-25 04:22:34 UTC
(
hide
)
Description:
Bug 16746: Proposed start of counter-patch
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-06-25 04:22:34 UTC
Size:
2.57 KB
patch
obsolete
>From 0d5d6b38a890cb0680dfb6c900aff30134006458 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sat, 25 Jun 2016 00:17:06 -0400 >Subject: [PATCH] Bug 16746: Proposed start of counter-patch > >This is the beginning of a counter patch. >Feel free to apply it and test it, Juan Romay Sieira. >However, please expand the test plan to be more >detailed: > >-- type X into field Y >-- click button Z >-- click downdrop W >-- select item V >-- enter 'text' into text box labelled A > >"Add a new authority that exists in your > authority server, Koha will now find none." >is not detailed enough for a person unfamiliar with the >interface. > >Feel free to apply 16809 first. :) >--- > Koha/SearchEngine/Zebra/Search.pm | 27 ++++++++++++++++++++------- > 1 file changed, 20 insertions(+), 7 deletions(-) > >diff --git a/Koha/SearchEngine/Zebra/Search.pm b/Koha/SearchEngine/Zebra/Search.pm >index 38e3cc4..2f47822 100644 >--- a/Koha/SearchEngine/Zebra/Search.pm >+++ b/Koha/SearchEngine/Zebra/Search.pm >@@ -21,10 +21,14 @@ use Modern::Perl; > > use base qw(Class::Accessor); > >+# Added index accessor, because base isn't Koha::SearchEngine >+# Because of nasty nested loopy dependencies that would >+# break things if it was changed right now. > __PACKAGE__->mk_ro_accessors(qw( index )); > > use C4::Search; # :( > use C4::AuthoritiesMarc; >+use Carp; > > =head1 NAME > >@@ -37,18 +41,25 @@ Koha::SearchEngine::Zebra::Search - Search implementation for Zebra > =item index > > The name of the index to use, generally 'biblios' or 'authorities'. >+It is provided as a parameter when this is instantiated. > >-=back >+ my $index = 'authorities'; # could be 'biblios' >+ my $searcher = >+ Koha::SearchEngine::Zebra::Search->new( { index => $index } ); > >-=head1 FUNCTIONS >+=back > > =cut > > sub new { >- my $class = shift @_; >- my $self = $class->SUPER::new(@_); >+ my @parameters = @_; >+ my $class = shift @parameters; >+ my $self = $class->SUPER::new(@parameters); >+ > # Check for a valid index >- croak('No index name provided') unless $self->index; >+ if ( !defined $self->index ) { >+ croak('No index name provided'); >+ } > return $self; > } > >@@ -96,9 +107,11 @@ This passes straight through to C4::Search::SimpleSearch. > > > sub simple_search_compat { >- my $self = shift; > my @parameters = @_; >- if ($self->index eq 'authorities') { >+ my $self = shift @parameters; >+ >+ # default is ['biblioserver'], so just fix authorities. >+ if ( $self->index eq 'authorities' ) { > push @parameters, ['authorityserver']; > } > return C4::Search::SimpleSearch(@parameters); >-- >2.1.4
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 16746
:
52440
|
52869
|
52870