From 6b8d0ddc09d806cd20151ab0429bdbee5b9c2cc3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jul 2019 15:23:09 -0300 Subject: [PATCH] Bug 23281: Cleanup Koha::Patron::Attribute::Types->search Signed-off-by: Kyle M Hall --- Koha/Patron/Attribute/Types.pm | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/Koha/Patron/Attribute/Types.pm b/Koha/Patron/Attribute/Types.pm index 5064fd2479..dfd9c227fa 100644 --- a/Koha/Patron/Attribute/Types.pm +++ b/Koha/Patron/Attribute/Types.pm @@ -27,39 +27,11 @@ Koha::Patron::Attribute::Types Object set class =head1 API -=head2 Class Methods +=head2 Internal methods =cut -=head3 Koha::Patron::Attribute::Types->search(); - -my @attribute_types = Koha::Patron::Attribute::Types->search($params); - -=cut - -sub search { - my ( $self, $params, $attributes ) = @_; - - my $branchcode = $params->{branchcode}; - delete( $params->{branchcode} ); - - my $or = - $branchcode - ? { - '-or' => [ - 'borrower_attribute_types_branches.b_branchcode' => undef, - 'borrower_attribute_types_branches.b_branchcode' => $branchcode, - ] - } - : {}; - my $join = $branchcode ? { join => 'borrower_attribute_types_branches' } : {}; - $attributes //= {}; - $attributes = { %$attributes, %$join }; - return $self->SUPER::search( { %$params, %$or, }, $attributes ); -} - - -=head3 type +=head3 _type =cut -- 2.20.1 (Apple Git-117)