From bcb9bf36b6fd739985ce09413235099acf2e946f Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 25 Mar 2015 17:29:14 +1300 Subject: [PATCH] Bug 12478: fix issues caused by rebasing Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- Koha/SearchEngine/Zebra/QueryBuilder.pm | 56 +++++++++++++++++++++++++ Koha/Template/Plugin/Price.pm | 7 ---- 2 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 Koha/SearchEngine/Zebra/QueryBuilder.pm diff --git a/Koha/SearchEngine/Zebra/QueryBuilder.pm b/Koha/SearchEngine/Zebra/QueryBuilder.pm new file mode 100644 index 0000000000..7913eb9496 --- /dev/null +++ b/Koha/SearchEngine/Zebra/QueryBuilder.pm @@ -0,0 +1,56 @@ +package Koha::SearchEngine::Zebra::QueryBuilder; + +# This file is part of Koha. +# +# Copyright 2012 BibLibre +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use base qw(Class::Accessor); +use Modern::Perl; +use Moose::Role; +use C4::Search; +use C4::AuthoritiesMarc; + +sub build_query { + shift; + C4::Search::buildQuery @_; +} + +sub build_query_compat { + # Because this passes directly on to C4::Search, we have no trouble being + # compatible. + build_query(@_); +} + +sub build_authorities_query { + shift; + C4::AuthoritiesMarc::SearchAuthorities(@_); + return { + marclist => $_[0], + and_or => $_[1], + excluding => $_[2], + operator => $_[3], + value => $_[4], + authtypecode => $_[5], + orderby => $_[6], + }; +} + +sub build_authorities_query_compat { + # Pass straight through as well + build_authorities_query(@_); +} + +1; diff --git a/Koha/Template/Plugin/Price.pm b/Koha/Template/Plugin/Price.pm index 73b6871c58..44f7cd8170 100644 --- a/Koha/Template/Plugin/Price.pm +++ b/Koha/Template/Plugin/Price.pm @@ -17,7 +17,6 @@ package Koha::Template::Plugin::Price; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use base qw(Class::Accessor); use Modern::Perl; use Template::Plugin::Filter; @@ -35,10 +34,4 @@ sub filter { : Koha::Number::Price->new( $value )->format; } -sub build_query_compat { - # Because this passes directly on to C4::Search, we have no trouble being - # compatible. - build_query(@_); -} - 1; -- 2.39.5