From 952488914f33ed62f40b0cf7b8a6bbc0aebd25f7 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Fri, 16 Sep 2011 19:38:06 +0200 Subject: [PATCH] Bug 6875 de-nesting C4::Heading C4::Search is needed only in authorities sub, moving it here and switching to require --- C4/Heading.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Heading.pm b/C4/Heading.pm index ba9d23f..e0c0097 100644 --- a/C4/Heading.pm +++ b/C4/Heading.pm @@ -23,7 +23,6 @@ use MARC::Record; use MARC::Field; use C4::Context; use C4::Heading::MARC21; -use C4::Search; use Carp; our $VERSION = 3.00; @@ -109,6 +108,7 @@ sub authorities { my $self = shift; my $query = qq(Match-heading,do-not-truncate,ext="$self->{'search_form'}"); $query .= $self->_query_limiters(); + require C4::Search; my ($error, $results, $total_hits) = SimpleSearch( $query, undef, undef, [ "authorityserver" ] ); if (defined $error) { carp "Error:$error from search $query"; -- 1.7.4.1