From 999da538f77bb9d4c2236bb452f2ca49058caa6e Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 16 Nov 2012 16:39:28 +0100 Subject: [PATCH 2/4] Bug 9072: Add CheckValidity option to Linker (followup 1) Perltidy formatting --- C4/Heading.pm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/C4/Heading.pm b/C4/Heading.pm index bc2f7c1..0afee5e 100644 --- a/C4/Heading.pm +++ b/C4/Heading.pm @@ -149,8 +149,8 @@ If passed a true value for $checkvalidity, SearchAuthorities will check authorit =cut sub authorities { - my $self = shift; - my $skipmetadata = shift; + my $self = shift; + my $skipmetadata = shift; my $checkvalidity = shift; return $self->_search( 'match-heading', $skipmetadata, $checkvalidity ); } @@ -166,8 +166,8 @@ If passed a true value for $checkvalidity, SearchAuthorities will check authorit =cut sub preferred_authorities { - my $self = shift; - my $skipmetadata = shift; + my $self = shift; + my $skipmetadata = shift; my $checkvalidity = shift; return $self->_search( 'see-from', $skipmetadata, $checkvalidity ); } @@ -182,7 +182,7 @@ Check whether the link with specified auth is valid. sub check_valid_auth_link { #TODO should be merged with C4::Biblio->_check_valid_auth_link - my $self = shift; + my $self = shift; my $authid = shift; my $field_value = $self->{'field'}->as_string('abcdefghijklmnopqrstuvwxyz'); @@ -193,7 +193,7 @@ sub check_valid_auth_link { C4::AuthoritiesMarc::GetAuthorizedHeading( { 'authid' => $authid } ); return unless $authorized_heading; - return ($field_value eq $authorized_heading); + return ( $field_value eq $authorized_heading ); } =head1 INTERNAL METHODS @@ -203,9 +203,9 @@ sub check_valid_auth_link { =cut sub _search { - my $self = shift; - my $index = shift || undef; - my $skipmetadata = shift || undef; + my $self = shift; + my $index = shift || undef; + my $skipmetadata = shift || undef; my $checkvalidity = shift || undef; my @marclist; my @and_or; @@ -229,9 +229,9 @@ sub _search { # } require C4::AuthoritiesMarc; my ( $authorities, $nbresults ) = C4::AuthoritiesMarc::SearchAuthorities( - \@marclist, \@and_or, \@excluding, \@operator, - \@value, 0, 10000, $self->{'auth_type'}, - 'AuthidAsc', $skipmetadata + \@marclist, \@and_or, \@excluding, \@operator, + \@value, 0, 10000, $self->{'auth_type'}, + 'AuthidAsc', $skipmetadata ); if ($checkvalidity) { -- 1.7.9.5